19#include "RNA_prototypes.hh"
31template<
typename Accessor>
44 if constexpr (Accessor::has_type) {
50 row.
prop(itemptr,
"name", blender::UI_ITEM_NONE,
"", ICON_NONE);
57template<
typename Accessor>
65 const_cast<ID *
>(&tree.
id), RNA_Node,
const_cast<bNode *
>(&
node));
81 Accessor::rna_names::items,
83 Accessor::rna_names::active_index.c_str(),
93 add_remove_col->
op(Accessor::operator_idnames::add_item,
"", ICON_ADD);
94 add_remove_col->
op(Accessor::operator_idnames::remove_item,
"", ICON_REMOVE);
98 PointerRNA op_ptr = up_down_col->
op(Accessor::operator_idnames::move_item,
"", ICON_TRIA_UP);
100 op_ptr = up_down_col->
op(Accessor::operator_idnames::move_item,
"", ICON_TRIA_DOWN);
106template<
typename Accessor>
111 using ItemT =
typename Accessor::ItemT;
124 const_cast<ID *
>(&tree.
id), *Accessor::item_srna, &item);
125 draw_item(&item_ptr);
133 PointerRNA op_ptr = layout.
op(Accessor::operator_idnames::add_item,
"", ICON_ADD);
134 RNA_int_set(&op_ptr,
"node_identifier", params.node.identifier);
#define STRNCPY_UTF8(dst, src)
static void draw_items_list_with_operators(const bContext *C, blender::ui::Layout *layout, const bNodeTree &tree, const bNode &node)
static auto draw_extend_socket_fn()
static void draw_item_in_list(uiList *, const bContext *C, blender::ui::Layout &layout, PointerRNA *, PointerRNA *itemptr, int, PointerRNA *, const char *, int, int)
static void draw_active_item_props(const bNodeTree &tree, const bNode &node, const FunctionRef< void(PointerRNA *item_ptr)> draw_item)
@ TEMPLATE_LIST_FLAG_NONE
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
VecBase< float, 4 > float4
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
bool WM_uilisttype_add(uiListType *ult)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
char idname[BKE_ST_MAXNAME]
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
Layout & column(bool align)
void emboss_set(EmbossType emboss)