Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/texture/nodes/node_texture_common.c
| Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | |||||
| void register_node_type_tex_group(void) | void register_node_type_tex_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, "TextureNodeGroup", "Group", NODE_CLASS_GROUP, 0); | node_type_base_custom(&ntype, "TextureNodeGroup", "Group", NODE_CLASS_GROUP); | ||||
| ntype.type = NODE_GROUP; | ntype.type = NODE_GROUP; | ||||
| ntype.poll = tex_node_poll_default; | ntype.poll = tex_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("TextureNodeGroup"); | ntype.rna_ext.srna = RNA_struct_find("TextureNodeGroup"); | ||||
| 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); | ||||
| node_type_socket_templates(&ntype, NULL, NULL); | node_type_socket_templates(&ntype, NULL, NULL); | ||||
| node_type_size(&ntype, 140, 60, 400); | node_type_size(&ntype, 140, 60, 400); | ||||
| ntype.labelfunc = node_group_label; | ntype.labelfunc = node_group_label; | ||||
| node_type_group_update(&ntype, node_group_update); | node_type_group_update(&ntype, node_group_update); | ||||
| node_type_exec(&ntype, group_initexec, group_freeexec, group_execute); | node_type_exec(&ntype, group_initexec, group_freeexec, group_execute); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||