36 layout->
prop_search(
ptr,
"layer_name", &dataptr,
"color_attributes",
"", ICON_GROUP_VCOL);
42 layout->
label(
RPT_(
"No mesh in active object"), ICON_ERROR);
79 return get_output_default(socket_out_->identifier, NodeItem::Type::Any);
93 ntype.
ui_name =
"Color Attribute";
95 "Retrieve a color attribute, or the default fallback if none is specified";
98 ntype.
declare = file_ns::node_declare;
99 ntype.
draw_buttons = file_ns::node_shader_buts_vertex_color;
100 ntype.
initfunc = file_ns::node_shader_init_vertex_color;
103 ntype.
gpu_fn = file_ns::node_shader_gpu_vertex_color;
PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
#define SH_NODE_VERTEX_COLOR
T * DEG_get_evaluated(const Depsgraph *depsgraph, T *id)
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_attribute_default_color(GPUMaterial *mat)
GPUNodeLink * GPU_attribute(GPUMaterial *mat, eCustomDataType type, const char *name)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
BPy_StructRNA * depsgraph
void * MEM_callocN(size_t len, const char *str)
void node_register_type(bNodeType &ntype)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
static void node_shader_init_vertex_color(bNodeTree *, bNode *node)
static void node_shader_buts_vertex_color(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_declare(NodeDeclarationBuilder &b)
static int node_shader_gpu_vertex_color(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void sh_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void register_node_type_sh_vertex_color()
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
PointerRNA RNA_id_pointer_create(ID *id)
NodeMaterialXFunction materialx_fn
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGPUExecFunction gpu_fn
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
void label(blender::StringRef name, int icon)
void prop_search(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, PropertyRNA *item_searchpropname, std::optional< blender::StringRefNull > name, int icon, bool results_are_suggestions)
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)