Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_mapping.c
| Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | static void node_shader_update_mapping(bNodeTree *ntree, bNode *node) | ||||
| nodeSetSocketAvailability( | nodeSetSocketAvailability( | ||||
| ntree, sock, ELEM(node->custom1, NODE_MAPPING_TYPE_POINT, NODE_MAPPING_TYPE_TEXTURE)); | ntree, sock, ELEM(node->custom1, NODE_MAPPING_TYPE_POINT, NODE_MAPPING_TYPE_TEXTURE)); | ||||
| } | } | ||||
| void register_node_type_sh_mapping(void) | void register_node_type_sh_mapping(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_node_type_base(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR, 0); | sh_node_type_base(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR); | ||||
| node_type_socket_templates(&ntype, sh_node_mapping_in, sh_node_mapping_out); | node_type_socket_templates(&ntype, sh_node_mapping_in, sh_node_mapping_out); | ||||
| node_type_gpu(&ntype, gpu_shader_mapping); | node_type_gpu(&ntype, gpu_shader_mapping); | ||||
| node_type_update(&ntype, node_shader_update_mapping); | node_type_update(&ntype, node_shader_update_mapping); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||