28 float index = ma ? ma->
index : 0.0f;
37 NodeItem res = empty();
38 std::string name = socket_out_->name;
40 if (name ==
"Location") {
41 res = create_node(
"position", NodeItem::Type::Vector3, {{
"space", val(std::string(
"world"))}});
43 else if (name ==
"Random") {
44 res = create_node(
"randomfloat", NodeItem::Type::Float);
47 res = get_output_default(name, NodeItem::Type::Any);
63 ntype.
declare = file_ns::node_declare;
64 ntype.
gpu_fn = file_ns::node_shader_gpu_object_info;
#define SH_NODE_OBJECT_INFO
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
GPUNodeLink * GPU_constant(const float *num)
@ GPU_MATFLAG_OBJECT_INFO
void GPU_material_flag_set(GPUMaterial *mat, eGPUMaterialFlag flag)
Material * GPU_material_get_material(GPUMaterial *material)
local_group_size(16, 16) .push_constant(Type b
void node_register_type(bNodeType *ntype)
static int node_shader_gpu_object_info(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
void register_node_type_sh_object_info()
void sh_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
NodeMaterialXFunction materialx_fn
NodeGPUExecFunction gpu_fn
NodeDeclareFunction declare