Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_hueSatVal.cc
- This file was moved from source/blender/nodes/composite/nodes/node_composite_hueSatVal.c.
| Show All 15 Lines | |||||
| * The Original Code is Copyright (C) 2006 Blender Foundation. | * The Original Code is Copyright (C) 2006 Blender Foundation. | ||||
| * All rights reserved. | * All rights reserved. | ||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup cmpnodes | * \ingroup cmpnodes | ||||
| */ | */ | ||||
| #include "node_composite_util.h" | #include "node_composite_util.hh" | ||||
| /* **************** Hue Saturation ******************** */ | /* **************** Hue Saturation ******************** */ | ||||
| static bNodeSocketTemplate cmp_node_hue_sat_in[] = { | |||||
| {SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, | namespace blender::nodes { | ||||
| {SOCK_FLOAT, N_("Hue"), 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, | |||||
| {SOCK_FLOAT, N_("Saturation"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR}, | static void cmp_node_huesatval_declare(NodeDeclarationBuilder &b) | ||||
| {SOCK_FLOAT, N_("Value"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR}, | { | ||||
| {SOCK_FLOAT, N_("Fac"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR}, | b.add_input<decl::Color>("Image").default_value({1.0f, 1.0f, 1.0f, 1.0f}); | ||||
| {-1, ""}, | b.add_input<decl::Float>("Hue").default_value(0.5f).min(0.0f).max(1.0f).subtype(PROP_FACTOR); | ||||
| }; | b.add_input<decl::Float>("Saturation") | ||||
| static bNodeSocketTemplate cmp_node_hue_sat_out[] = { | .default_value(1.0f) | ||||
| {SOCK_RGBA, N_("Image")}, | .min(0.0f) | ||||
| {-1, ""}, | .max(2.0f) | ||||
| }; | .subtype(PROP_FACTOR); | ||||
| b.add_input<decl::Float>("Value").default_value(1.0f).min(0.0f).max(2.0f).subtype(PROP_FACTOR); | |||||
| b.add_input<decl::Float>("Fac").default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR); | |||||
| b.add_output<decl::Color>("Image"); | |||||
| } | |||||
| } // namespace blender::nodes | |||||
| void register_node_type_cmp_hue_sat(void) | void register_node_type_cmp_hue_sat(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, 0); | cmp_node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, 0); | ||||
| node_type_socket_templates(&ntype, cmp_node_hue_sat_in, cmp_node_hue_sat_out); | ntype.declare = blender::nodes::cmp_node_huesatval_declare; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||