Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_tex_noise.c
| Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | static void node_shader_update_tex_noise(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| nodeSetSocketAvailability(sockW, tex->dimensions == 1 || tex->dimensions == 4); | nodeSetSocketAvailability(sockW, tex->dimensions == 1 || tex->dimensions == 4); | ||||
| } | } | ||||
| /* node type definition */ | /* node type definition */ | ||||
| void register_node_type_sh_tex_noise(void) | void register_node_type_sh_tex_noise(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_fn_node_type_base(&ntype, SH_NODE_TEX_NOISE, "Noise Texture", NODE_CLASS_TEXTURE, 0); | sh_node_type_base(&ntype, SH_NODE_TEX_NOISE, "Noise Texture", NODE_CLASS_TEXTURE, 0); | ||||
| node_type_socket_templates(&ntype, sh_node_tex_noise_in, sh_node_tex_noise_out); | node_type_socket_templates(&ntype, sh_node_tex_noise_in, sh_node_tex_noise_out); | ||||
| node_type_init(&ntype, node_shader_init_tex_noise); | node_type_init(&ntype, node_shader_init_tex_noise); | ||||
| node_type_storage( | node_type_storage( | ||||
| &ntype, "NodeTexNoise", node_free_standard_storage, node_copy_standard_storage); | &ntype, "NodeTexNoise", node_free_standard_storage, node_copy_standard_storage); | ||||
| node_type_gpu(&ntype, node_shader_gpu_tex_noise); | node_type_gpu(&ntype, node_shader_gpu_tex_noise); | ||||
| node_type_update(&ntype, node_shader_update_tex_noise); | node_type_update(&ntype, node_shader_update_tex_noise); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||