Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_colorSpill.cc
- This file was moved from source/blender/nodes/composite/nodes/node_composite_colorSpill.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" | ||||
| /* ******************* Color Spill Suppression ********************************* */ | /* ******************* Color Spill Suppression ********************************* */ | ||||
| static bNodeSocketTemplate cmp_node_color_spill_in[] = { | static bNodeSocketTemplate cmp_node_color_spill_in[] = { | ||||
| {SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, | {SOCK_RGBA, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, | ||||
| {SOCK_FLOAT, N_("Fac"), 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, | {SOCK_FLOAT, N_("Fac"), 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| static bNodeSocketTemplate cmp_node_color_spill_out[] = { | static bNodeSocketTemplate cmp_node_color_spill_out[] = { | ||||
| {SOCK_RGBA, N_("Image")}, | {SOCK_RGBA, N_("Image")}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| 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_callocN(sizeof(NodeColorspill), "node colorspill"); | NodeColorspill *ncs = (NodeColorspill *)MEM_callocN(sizeof(NodeColorspill), "node colorspill"); | ||||
| 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 All 12 Lines | |||||