Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_curves.cc
| Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | |||||
| } // namespace blender::nodes::node_shader_curves_cc | } // namespace blender::nodes::node_shader_curves_cc | ||||
| void register_node_type_sh_curve_vec() | void register_node_type_sh_curve_vec() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_shader_curves_cc; | namespace file_ns = blender::nodes::node_shader_curves_cc; | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_fn_node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, 0); | sh_fn_node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR); | ||||
| ntype.declare = file_ns::sh_node_curve_vec_declare; | ntype.declare = file_ns::sh_node_curve_vec_declare; | ||||
| node_type_init(&ntype, file_ns::node_shader_init_curve_vec); | node_type_init(&ntype, file_ns::node_shader_init_curve_vec); | ||||
| node_type_size_preset(&ntype, NODE_SIZE_LARGE); | node_type_size_preset(&ntype, NODE_SIZE_LARGE); | ||||
| 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, nullptr, file_ns::node_shader_exec_curve_vec); | node_type_exec(&ntype, node_initexec_curves, nullptr, file_ns::node_shader_exec_curve_vec); | ||||
| node_type_gpu(&ntype, file_ns::gpu_shader_curve_vec); | node_type_gpu(&ntype, file_ns::gpu_shader_curve_vec); | ||||
| ntype.build_multi_function = file_ns::sh_node_curve_vec_build_multi_function; | ntype.build_multi_function = file_ns::sh_node_curve_vec_build_multi_function; | ||||
| ▲ Show 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | |||||
| } // namespace blender::nodes::node_shader_curves_cc | } // namespace blender::nodes::node_shader_curves_cc | ||||
| void register_node_type_sh_curve_rgb() | void register_node_type_sh_curve_rgb() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_shader_curves_cc; | namespace file_ns = blender::nodes::node_shader_curves_cc; | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_fn_node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, 0); | sh_fn_node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR); | ||||
| ntype.declare = file_ns::sh_node_curve_rgb_declare; | ntype.declare = file_ns::sh_node_curve_rgb_declare; | ||||
| node_type_init(&ntype, file_ns::node_shader_init_curve_rgb); | node_type_init(&ntype, file_ns::node_shader_init_curve_rgb); | ||||
| node_type_size_preset(&ntype, NODE_SIZE_LARGE); | node_type_size_preset(&ntype, NODE_SIZE_LARGE); | ||||
| 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, nullptr, file_ns::node_shader_exec_curve_rgb); | node_type_exec(&ntype, node_initexec_curves, nullptr, file_ns::node_shader_exec_curve_rgb); | ||||
| node_type_gpu(&ntype, file_ns::gpu_shader_curve_rgb); | node_type_gpu(&ntype, file_ns::gpu_shader_curve_rgb); | ||||
| ntype.build_multi_function = file_ns::sh_node_curve_rgb_build_multi_function; | ntype.build_multi_function = file_ns::sh_node_curve_rgb_build_multi_function; | ||||
| ▲ Show 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | |||||
| } // namespace blender::nodes::node_shader_curves_cc | } // namespace blender::nodes::node_shader_curves_cc | ||||
| void register_node_type_sh_curve_float() | void register_node_type_sh_curve_float() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_shader_curves_cc; | namespace file_ns = blender::nodes::node_shader_curves_cc; | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| sh_fn_node_type_base(&ntype, SH_NODE_CURVE_FLOAT, "Float Curve", NODE_CLASS_CONVERTER, 0); | sh_fn_node_type_base(&ntype, SH_NODE_CURVE_FLOAT, "Float Curve", NODE_CLASS_CONVERTER); | ||||
| ntype.declare = file_ns::sh_node_curve_float_declare; | ntype.declare = file_ns::sh_node_curve_float_declare; | ||||
| node_type_init(&ntype, file_ns::node_shader_init_curve_float); | node_type_init(&ntype, file_ns::node_shader_init_curve_float); | ||||
| node_type_size_preset(&ntype, NODE_SIZE_LARGE); | node_type_size_preset(&ntype, NODE_SIZE_LARGE); | ||||
| 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, nullptr, file_ns::node_shader_exec_curve_float); | node_type_exec(&ntype, node_initexec_curves, nullptr, file_ns::node_shader_exec_curve_float); | ||||
| node_type_gpu(&ntype, file_ns::gpu_shader_curve_float); | node_type_gpu(&ntype, file_ns::gpu_shader_curve_float); | ||||
| ntype.build_multi_function = file_ns::sh_node_curve_float_build_multi_function; | ntype.build_multi_function = file_ns::sh_node_curve_float_build_multi_function; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||