Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_texture.cc
- This file was moved from source/blender/nodes/composite/nodes/node_composite_texture.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" | ||||
| /* **************** TEXTURE ******************** */ | /* **************** TEXTURE ******************** */ | ||||
| static bNodeSocketTemplate cmp_node_texture_in[] = { | |||||
| {SOCK_VECTOR, N_("Offset"), 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_TRANSLATION}, | namespace blender::nodes { | ||||
| {SOCK_VECTOR, N_("Scale"), 1.0f, 1.0f, 1.0f, 1.0f, -10.0f, 10.0f, PROP_XYZ}, | |||||
| {-1, ""}, | static void cmp_node_texture_declare(NodeDeclarationBuilder &b) | ||||
| }; | { | ||||
| static bNodeSocketTemplate cmp_node_texture_out[] = { | b.add_input<decl::Vector>("Offset").min(-2.0f).max(2.0f).subtype(PROP_TRANSLATION); | ||||
| {SOCK_FLOAT, N_("Value")}, | b.add_input<decl::Vector>("Scale") | ||||
| {SOCK_RGBA, N_("Color")}, | .default_value({1.0f, 1.0f, 1.0f}) | ||||
| {-1, ""}, | .min(-10.0f) | ||||
| }; | .max(10.0f) | ||||
| .subtype(PROP_XYZ); | |||||
| b.add_output<decl::Float>("Value"); | |||||
| b.add_output<decl::Color>("Color"); | |||||
| } | |||||
| } // namespace blender::nodes | |||||
| void register_node_type_cmp_texture(void) | void register_node_type_cmp_texture(void) | ||||
| { | { | ||||
| 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); | ||||
| node_type_socket_templates(&ntype, cmp_node_texture_in, cmp_node_texture_out); | ntype.declare = blender::nodes::cmp_node_texture_declare; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||