Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_curves.cc
| Show All 23 Lines | |||||
| #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) | ||||
| { | { | ||||
| b.add_output<decl::Float>("Fac"); | b.add_output<decl::Float>(N_("Fac")); | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| /* custom1 = start_frame, custom2 = end_frame */ | /* custom1 = start_frame, custom2 = end_frame */ | ||||
| static void node_composit_init_curves_time(bNodeTree *UNUSED(ntree), bNode *node) | static void node_composit_init_curves_time(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| node->custom1 = 1; | node->custom1 = 1; | ||||
| ▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /* **************** CURVE RGB ******************** */ | /* **************** CURVE RGB ******************** */ | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void cmp_node_rgbcurves_declare(NodeDeclarationBuilder &b) | static void cmp_node_rgbcurves_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Float>("Fac").default_value(1.0f).min(-1.0f).max(1.0f).subtype(PROP_FACTOR); | b.add_input<decl::Float>(N_("Fac")).default_value(1.0f).min(-1.0f).max(1.0f).subtype( | ||||
| b.add_input<decl::Color>("Image").default_value({1.0f, 1.0f, 1.0f, 1.0f}); | PROP_FACTOR); | ||||
| b.add_input<decl::Color>("Black Level").default_value({0.0f, 0.0f, 0.0f, 1.0f}); | b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f}); | ||||
| b.add_input<decl::Color>("White Level").default_value({1.0f, 1.0f, 1.0f, 1.0f}); | b.add_input<decl::Color>(N_("Black Level")).default_value({0.0f, 0.0f, 0.0f, 1.0f}); | ||||
| b.add_output<decl::Color>("Image"); | b.add_input<decl::Color>(N_("White Level")).default_value({1.0f, 1.0f, 1.0f, 1.0f}); | ||||
| b.add_output<decl::Color>(N_("Image")); | |||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static void node_composit_init_curve_rgb(bNodeTree *UNUSED(ntree), bNode *node) | static void node_composit_init_curve_rgb(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| node->storage = BKE_curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); | node->storage = BKE_curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); | ||||
| } | } | ||||
| Show All 13 Lines | |||||