14#include "RNA_prototypes.hh"
24template<
typename Accessor>
37 if constexpr (Accessor::has_type) {
50template<
typename Accessor>
58 const_cast<ID *
>(&
tree.id), &RNA_Node,
const_cast<bNode *
>(&node));
74 Accessor::rna_names::items,
76 Accessor::rna_names::active_index.c_str(),
87 add_remove_col->
op(Accessor::operator_idnames::add_item,
"", ICON_ADD);
88 add_remove_col->
op(Accessor::operator_idnames::remove_item,
"", ICON_REMOVE);
93 up_down_col, Accessor::operator_idnames::move_item,
"", ICON_TRIA_UP,
"direction", 0);
95 up_down_col, Accessor::operator_idnames::move_item,
"", ICON_TRIA_DOWN,
"direction", 1);
100template<
typename Accessor>
105 using ItemT =
typename Accessor::ItemT;
118 const_cast<ID *
>(&
tree.id), Accessor::item_srna, &item);
119 draw_item(&item_ptr);
char * STRNCPY(char(&dst)[N], const char *src)
void uiTemplateNodeSocket(uiLayout *layout, bContext *C, const float color[4])
void uiTemplateList(uiLayout *layout, const bContext *C, const char *listtype_name, const char *list_id, PointerRNA *dataptr, blender::StringRefNull propname, PointerRNA *active_dataptr, const char *active_propname, const char *item_dyntip_propname, int rows, int maxrows, int layout_type, int columns, enum uiTemplateListFlags flags)
@ UI_TEMPLATE_LIST_FLAG_NONE
void uiItemEnumO(uiLayout *layout, blender::StringRefNull opname, std::optional< blender::StringRef > name, int icon, blender::StringRefNull propname, int value)
void uiLayoutSetEmboss(uiLayout *layout, blender::ui::EmbossType emboss)
void * MEM_callocN(size_t len, const char *str)
static void draw_items_list_with_operators(const bContext *C, uiLayout *layout, const bNodeTree &tree, const bNode &node)
static void draw_active_item_props(const bNodeTree &tree, const bNode &node, const FunctionRef< void(PointerRNA *item_ptr)> draw_item)
static void draw_item_in_list(uiList *, const bContext *C, uiLayout *layout, PointerRNA *, PointerRNA *itemptr, int, PointerRNA *, const char *, int, int)
VecBase< float, 4 > float4
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, wmOperatorCallContext context, eUI_Item_Flag flag)
uiLayout & column(bool align)
uiLayout & row(bool align)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
char idname[BKE_ST_MAXNAME]
uiListDrawItemFunc draw_item
bool WM_uilisttype_add(uiListType *ult)