Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_colorSpill.cc
| Show All 37 Lines | static void cmp_node_color_spill_declare(NodeDeclarationBuilder &b) | ||||
| b.add_input<decl::Float>(N_("Fac")).default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR); | b.add_input<decl::Float>(N_("Fac")).default_value(1.0f).min(0.0f).max(1.0f).subtype(PROP_FACTOR); | ||||
| b.add_output<decl::Color>(N_("Image")); | b.add_output<decl::Color>(N_("Image")); | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| static void node_composit_init_color_spill(bNodeTree *UNUSED(ntree), bNode *node) | static void node_composit_init_color_spill(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| NodeColorspill *ncs = MEM_cnew<NodeColorspill>(__func__); | NodeColorspill *ncs = MEM_cnew<NodeColorspill>(MEM_AT); | ||||
| node->storage = ncs; | node->storage = ncs; | ||||
| node->custom1 = 2; /* green channel */ | node->custom1 = 2; /* green channel */ | ||||
| node->custom2 = 0; /* simple limit algorithm */ | node->custom2 = 0; /* simple limit algorithm */ | ||||
| ncs->limchan = 0; /* limit by red */ | ncs->limchan = 0; /* limit by red */ | ||||
| ncs->limscale = 1.0f; /* limit scaling factor */ | ncs->limscale = 1.0f; /* limit scaling factor */ | ||||
| ncs->unspill = 0; /* do not use unspill */ | ncs->unspill = 0; /* do not use unspill */ | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines | |||||