Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/texture/nodes/node_texture_proc.c
| Show First 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /* Node type definitions */ | /* Node type definitions */ | ||||
| #define TexDef(TEXTYPE, outputs, name, Name) \ | #define TexDef(TEXTYPE, outputs, name, Name) \ | ||||
| void register_node_type_tex_proc_##name(void) \ | void register_node_type_tex_proc_##name(void) \ | ||||
| { \ | { \ | ||||
| static bNodeType ntype; \ | static bNodeType ntype; \ | ||||
| \ | \ | ||||
| tex_node_type_base(&ntype, TEX_NODE_PROC + TEXTYPE, Name, NODE_CLASS_TEXTURE, NODE_PREVIEW); \ | tex_node_type_base(&ntype, TEX_NODE_PROC + TEXTYPE, Name, NODE_CLASS_TEXTURE); \ | ||||
| node_type_socket_templates(&ntype, name##_inputs, outputs); \ | node_type_socket_templates(&ntype, name##_inputs, outputs); \ | ||||
| node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); \ | node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); \ | ||||
| node_type_init(&ntype, init); \ | node_type_init(&ntype, init); \ | ||||
| node_type_storage(&ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \ | node_type_storage(&ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \ | ||||
| node_type_exec(&ntype, NULL, NULL, name##_exec); \ | node_type_exec(&ntype, NULL, NULL, name##_exec); \ | ||||
| ntype.flag |= NODE_PREVIEW; \ | |||||
| \ | \ | ||||
| nodeRegisterType(&ntype); \ | nodeRegisterType(&ntype); \ | ||||
| } | } | ||||
| #define C outputs_color_only | #define C outputs_color_only | ||||
| #define CV outputs_both | #define CV outputs_both | ||||
| TexDef(TEX_VORONOI, CV, voronoi, "Voronoi") TexDef(TEX_BLEND, C, blend, "Blend"); | TexDef(TEX_VORONOI, CV, voronoi, "Voronoi") TexDef(TEX_BLEND, C, blend, "Blend"); | ||||
| TexDef(TEX_MAGIC, C, magic, "Magic") TexDef(TEX_MARBLE, CV, marble, "Marble"); | TexDef(TEX_MAGIC, C, magic, "Magic") TexDef(TEX_MARBLE, CV, marble, "Marble"); | ||||
| TexDef(TEX_CLOUDS, CV, clouds, "Clouds") TexDef(TEX_WOOD, CV, wood, "Wood"); | TexDef(TEX_CLOUDS, CV, clouds, "Clouds") TexDef(TEX_WOOD, CV, wood, "Wood"); | ||||
| TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave") TexDef(TEX_NOISE, C, noise, "Noise"); | TexDef(TEX_MUSGRAVE, CV, musgrave, "Musgrave") TexDef(TEX_NOISE, C, noise, "Noise"); | ||||
| TexDef(TEX_STUCCI, CV, stucci, "Stucci"); | TexDef(TEX_STUCCI, CV, stucci, "Stucci"); | ||||
| TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise"); | TexDef(TEX_DISTNOISE, CV, distnoise, "Distorted Noise"); | ||||