Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_curves.cc
| Show All 22 Lines | |||||
| #include "node_shader_util.h" | #include "node_shader_util.h" | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void sh_node_curve_vec_declare(NodeDeclarationBuilder &b) | static void sh_node_curve_vec_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.is_function_node(); | b.is_function_node(); | ||||
| b.add_input<decl::Float>("Fac").min(0.0f).max(1.0f).default_value(1.0f).subtype(PROP_FACTOR); | b.add_input<decl::Float>(N_("Fac")).min(0.0f).max(1.0f).default_value(1.0f).subtype(PROP_FACTOR); | ||||
| b.add_input<decl::Vector>("Vector").min(-1.0f).max(1.0f); | b.add_input<decl::Vector>(N_("Vector")).min(-1.0f).max(1.0f); | ||||
| b.add_output<decl::Vector>("Vector"); | b.add_output<decl::Vector>(N_("Vector")); | ||||
| }; | }; | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static void node_shader_exec_curve_vec(void *UNUSED(data), | static void node_shader_exec_curve_vec(void *UNUSED(data), | ||||
| int UNUSED(thread), | int UNUSED(thread), | ||||
| bNode *node, | bNode *node, | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| ▲ Show 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | |||||
| /* **************** CURVE RGB ******************** */ | /* **************** CURVE RGB ******************** */ | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void sh_node_curve_rgb_declare(NodeDeclarationBuilder &b) | static void sh_node_curve_rgb_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.is_function_node(); | b.is_function_node(); | ||||
| b.add_input<decl::Float>("Fac").min(0.0f).max(1.0f).default_value(1.0f).subtype(PROP_FACTOR); | b.add_input<decl::Float>(N_("Fac")).min(0.0f).max(1.0f).default_value(1.0f).subtype(PROP_FACTOR); | ||||
| b.add_input<decl::Color>("Color").default_value({1.0f, 1.0f, 1.0f, 1.0f}); | b.add_input<decl::Color>(N_("Color")).default_value({1.0f, 1.0f, 1.0f, 1.0f}); | ||||
| b.add_output<decl::Color>("Color"); | b.add_output<decl::Color>(N_("Color")); | ||||
| }; | }; | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static void node_shader_exec_curve_rgb(void *UNUSED(data), | static void node_shader_exec_curve_rgb(void *UNUSED(data), | ||||
| int UNUSED(thread), | int UNUSED(thread), | ||||
| bNode *node, | bNode *node, | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| ▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | |||||
| /* **************** CURVE FLOAT ******************** */ | /* **************** CURVE FLOAT ******************** */ | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void sh_node_curve_float_declare(NodeDeclarationBuilder &b) | static void sh_node_curve_float_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.is_function_node(); | b.is_function_node(); | ||||
| b.add_input<decl::Float>("Factor").min(0.0f).max(1.0f).default_value(1.0f).subtype(PROP_FACTOR); | b.add_input<decl::Float>(N_("Factor")) | ||||
| b.add_input<decl::Float>("Value").default_value(1.0f); | .min(0.0f) | ||||
| b.add_output<decl::Float>("Value"); | .max(1.0f) | ||||
| .default_value(1.0f) | |||||
| .subtype(PROP_FACTOR); | |||||
| b.add_input<decl::Float>(N_("Value")).default_value(1.0f); | |||||
| b.add_output<decl::Float>(N_("Value")); | |||||
| }; | }; | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static void node_shader_exec_curve_float(void *UNUSED(data), | static void node_shader_exec_curve_float(void *UNUSED(data), | ||||
| int UNUSED(thread), | int UNUSED(thread), | ||||
| bNode *node, | bNode *node, | ||||
| bNodeExecData *UNUSED(execdata), | bNodeExecData *UNUSED(execdata), | ||||
| ▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines | |||||