Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_curves.cc
| 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 "UI_interface.h" | |||||
| #include "UI_resources.h" | |||||
| #include "node_composite_util.hh" | #include "node_composite_util.hh" | ||||
| /* **************** CURVE Time ******************** */ | /* **************** CURVE Time ******************** */ | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void cmp_node_time_declare(NodeDeclarationBuilder &b) | static void cmp_node_time_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| Show All 35 Lines | |||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static void node_composit_init_curve_vec(bNodeTree *UNUSED(ntree), bNode *node) | static void node_composit_init_curve_vec(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| node->storage = BKE_curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f); | node->storage = BKE_curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f); | ||||
| } | } | ||||
| static void node_buts_curvevec(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | |||||
| { | |||||
| uiTemplateCurveMapping(layout, ptr, "mapping", 'v', false, false, false, false); | |||||
| } | |||||
| void register_node_type_cmp_curve_vec() | void register_node_type_cmp_curve_vec() | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, 0); | cmp_node_type_base(&ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, 0); | ||||
| ntype.declare = blender::nodes::cmp_node_curve_vec_declare; | ntype.declare = blender::nodes::cmp_node_curve_vec_declare; | ||||
| ntype.draw_buttons = node_buts_curvevec; | |||||
| node_type_size(&ntype, 200, 140, 320); | node_type_size(&ntype, 200, 140, 320); | ||||
| node_type_init(&ntype, node_composit_init_curve_vec); | node_type_init(&ntype, node_composit_init_curve_vec); | ||||
| node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); | node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||
| /* **************** CURVE RGB ******************** */ | /* **************** CURVE RGB ******************** */ | ||||
| Show All 32 Lines | |||||