Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/texture/nodes/node_texture_curves.c
| Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | static void time_init(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| node->custom2 = 250; | node->custom2 = 250; | ||||
| node->storage = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); | node->storage = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); | ||||
| } | } | ||||
| void register_node_type_tex_curve_time(void) | void register_node_type_tex_curve_time(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| tex_node_type_base(&ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT, 0); | tex_node_type_base(&ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT); | ||||
| node_type_socket_templates(&ntype, NULL, time_outputs); | node_type_socket_templates(&ntype, NULL, time_outputs); | ||||
| node_type_size_preset(&ntype, NODE_SIZE_LARGE); | node_type_size_preset(&ntype, NODE_SIZE_LARGE); | ||||
| node_type_init(&ntype, time_init); | node_type_init(&ntype, time_init); | ||||
| node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); | node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); | ||||
| node_type_exec(&ntype, node_initexec_curves, NULL, time_exec); | node_type_exec(&ntype, node_initexec_curves, NULL, time_exec); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||
| Show All 32 Lines | |||||
| { | { | ||||
| node->storage = BKE_curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); | node->storage = BKE_curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); | ||||
| } | } | ||||
| void register_node_type_tex_curve_rgb(void) | void register_node_type_tex_curve_rgb(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| tex_node_type_base(&ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, 0); | tex_node_type_base(&ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR); | ||||
| node_type_socket_templates(&ntype, rgb_inputs, rgb_outputs); | node_type_socket_templates(&ntype, rgb_inputs, rgb_outputs); | ||||
| node_type_size_preset(&ntype, NODE_SIZE_LARGE); | node_type_size_preset(&ntype, NODE_SIZE_LARGE); | ||||
| node_type_init(&ntype, rgb_init); | node_type_init(&ntype, rgb_init); | ||||
| node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); | node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); | ||||
| node_type_exec(&ntype, node_initexec_curves, NULL, rgb_exec); | node_type_exec(&ntype, node_initexec_curves, NULL, rgb_exec); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||