Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_texture.cc
| Show All 19 Lines | |||||
| /** \file | /** \file | ||||
| * \ingroup cmpnodes | * \ingroup cmpnodes | ||||
| */ | */ | ||||
| #include "node_composite_util.hh" | #include "node_composite_util.hh" | ||||
| /* **************** TEXTURE ******************** */ | /* **************** TEXTURE ******************** */ | ||||
| namespace blender::nodes { | namespace blender::nodes::node_cmp_texture_cc { | ||||
| static void cmp_node_texture_declare(NodeDeclarationBuilder &b) | static void cmp_node_texture_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Vector>(N_("Offset")).min(-2.0f).max(2.0f).subtype(PROP_TRANSLATION); | b.add_input<decl::Vector>(N_("Offset")).min(-2.0f).max(2.0f).subtype(PROP_TRANSLATION); | ||||
| b.add_input<decl::Vector>(N_("Scale")) | b.add_input<decl::Vector>(N_("Scale")) | ||||
| .default_value({1.0f, 1.0f, 1.0f}) | .default_value({1.0f, 1.0f, 1.0f}) | ||||
| .min(-10.0f) | .min(-10.0f) | ||||
| .max(10.0f) | .max(10.0f) | ||||
| .subtype(PROP_XYZ); | .subtype(PROP_XYZ); | ||||
| b.add_output<decl::Float>(N_("Value")); | b.add_output<decl::Float>(N_("Value")); | ||||
| b.add_output<decl::Color>(N_("Color")); | b.add_output<decl::Color>(N_("Color")); | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes::node_cmp_texture_cc | ||||
| void register_node_type_cmp_texture(void) | void register_node_type_cmp_texture(void) | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_cmp_texture_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_PREVIEW); | cmp_node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_PREVIEW); | ||||
| ntype.declare = blender::nodes::cmp_node_texture_declare; | ntype.declare = file_ns::cmp_node_texture_declare; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||