Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_common.c
| Show First 20 Lines • Show All 226 Lines • ▼ Show 20 Lines | |||||
| void register_node_type_sh_group(void) | void register_node_type_sh_group(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| /* NOTE: cannot use #sh_node_type_base for node group, because it would map the node type | /* NOTE: cannot use #sh_node_type_base for node group, because it would map the node type | ||||
| * to the shared #NODE_GROUP integer type id. */ | * to the shared #NODE_GROUP integer type id. */ | ||||
| node_type_base_custom(&ntype, "ShaderNodeGroup", "Group", NODE_CLASS_GROUP, 0); | node_type_base_custom(&ntype, "ShaderNodeGroup", "Group", NODE_CLASS_GROUP); | ||||
| ntype.type = NODE_GROUP; | ntype.type = NODE_GROUP; | ||||
| ntype.poll = sh_node_poll_default; | ntype.poll = sh_node_poll_default; | ||||
| ntype.poll_instance = node_group_poll_instance; | ntype.poll_instance = node_group_poll_instance; | ||||
| ntype.insert_link = node_insert_link_default; | ntype.insert_link = node_insert_link_default; | ||||
| ntype.rna_ext.srna = RNA_struct_find("ShaderNodeGroup"); | ntype.rna_ext.srna = RNA_struct_find("ShaderNodeGroup"); | ||||
| BLI_assert(ntype.rna_ext.srna != NULL); | BLI_assert(ntype.rna_ext.srna != NULL); | ||||
| RNA_struct_blender_type_set(ntype.rna_ext.srna, &ntype); | RNA_struct_blender_type_set(ntype.rna_ext.srna, &ntype); | ||||
| Show All 23 Lines | |||||