Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/texture/nodes/node_texture_valToRgb.c
| Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| node->storage = BKE_colorband_add(true); | node->storage = BKE_colorband_add(true); | ||||
| } | } | ||||
| void register_node_type_tex_valtorgb(void) | void register_node_type_tex_valtorgb(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| tex_node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTER, 0); | tex_node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTER); | ||||
| node_type_socket_templates(&ntype, valtorgb_in, valtorgb_out); | node_type_socket_templates(&ntype, valtorgb_in, valtorgb_out); | ||||
| node_type_size_preset(&ntype, NODE_SIZE_LARGE); | node_type_size_preset(&ntype, NODE_SIZE_LARGE); | ||||
| node_type_init(&ntype, valtorgb_init); | node_type_init(&ntype, valtorgb_init); | ||||
| node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); | node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); | ||||
| node_type_exec(&ntype, NULL, NULL, valtorgb_exec); | node_type_exec(&ntype, NULL, NULL, valtorgb_exec); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||
| Show All 25 Lines | |||||
| { | { | ||||
| tex_output(node, execdata, in, out[0], &rgbtobw_valuefn, data); | tex_output(node, execdata, in, out[0], &rgbtobw_valuefn, data); | ||||
| } | } | ||||
| void register_node_type_tex_rgbtobw(void) | void register_node_type_tex_rgbtobw(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| tex_node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTER, 0); | tex_node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTER); | ||||
| node_type_socket_templates(&ntype, rgbtobw_in, rgbtobw_out); | node_type_socket_templates(&ntype, rgbtobw_in, rgbtobw_out); | ||||
| node_type_exec(&ntype, NULL, NULL, rgbtobw_exec); | node_type_exec(&ntype, NULL, NULL, rgbtobw_exec); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||