15#include "RNA_prototypes.hh"
26template<
typename Accessor>
39 if constexpr (Accessor::has_type) {
52template<
typename Accessor>
60 const_cast<ID *
>(&
tree.id), &RNA_Node,
const_cast<bNode *
>(&node));
76 Accessor::rna_names::items,
78 Accessor::rna_names::active_index.c_str(),
89 add_remove_col->
op(Accessor::operator_idnames::add_item,
"", ICON_ADD);
90 add_remove_col->
op(Accessor::operator_idnames::remove_item,
"", ICON_REMOVE);
94 PointerRNA op_ptr = up_down_col->
op(Accessor::operator_idnames::move_item,
"", ICON_TRIA_UP);
96 op_ptr = up_down_col->
op(Accessor::operator_idnames::move_item,
"", ICON_TRIA_DOWN);
102template<
typename Accessor>
107 using ItemT =
typename Accessor::ItemT;
120 const_cast<ID *
>(&
tree.id), Accessor::item_srna, &item);
121 draw_item(&item_ptr);
#define STRNCPY_UTF8(dst, 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 * 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)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
uiLayout & column(bool align)
uiLayout & row(bool align)
void emboss_set(blender::ui::EmbossType emboss)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
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)