Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_rotate.cc
| Show All 19 Lines | |||||
| /** \file | /** \file | ||||
| * \ingroup cmpnodes | * \ingroup cmpnodes | ||||
| */ | */ | ||||
| #include "node_composite_util.hh" | #include "node_composite_util.hh" | ||||
| /* **************** Rotate ******************** */ | /* **************** Rotate ******************** */ | ||||
| static bNodeSocketTemplate cmp_node_rotate_in[] = { | namespace blender::nodes { | ||||
| {SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, | |||||
| {SOCK_FLOAT, N_("Degr"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_ANGLE}, | static void cmp_node_rotate_declare(NodeDeclarationBuilder &b) | ||||
| {-1, ""}, | { | ||||
| }; | b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f}); | ||||
| static bNodeSocketTemplate cmp_node_rotate_out[] = { | b.add_input<decl::Float>(N_("Degr")) | ||||
| {SOCK_RGBA, N_("Image")}, | .default_value(0.0f) | ||||
| {-1, ""}, | .min(-10000.0f) | ||||
| }; | .max(10000.0f) | ||||
| .subtype(PROP_ANGLE); | |||||
| b.add_output<decl::Color>(N_("Image")); | |||||
| } | |||||
| } // namespace blender::nodes | |||||
| static void node_composit_init_rotate(bNodeTree *UNUSED(ntree), bNode *node) | static void node_composit_init_rotate(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| node->custom1 = 1; /* Bilinear Filter. */ | node->custom1 = 1; /* Bilinear Filter. */ | ||||
| } | } | ||||
| void register_node_type_cmp_rotate(void) | void register_node_type_cmp_rotate() | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, 0); | cmp_node_type_base(&ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, 0); | ||||
| node_type_socket_templates(&ntype, cmp_node_rotate_in, cmp_node_rotate_out); | ntype.declare = blender::nodes::cmp_node_rotate_declare; | ||||
| node_type_init(&ntype, node_composit_init_rotate); | node_type_init(&ntype, node_composit_init_rotate); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||