diff options
-rw-r--r-- | source/blender/compositor/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/compositor/nodes/COM_KeyingNode.cpp | 22 | ||||
-rw-r--r-- | source/blender/compositor/nodes/COM_KeyingNode.h | 2 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_KeyingDespillOperation.cpp (renamed from source/blender/compositor/operations/COM_KeyingDispillOperation.cpp) | 16 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_KeyingDespillOperation.h (renamed from source/blender/compositor/operations/COM_KeyingDispillOperation.h) | 14 | ||||
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 6 | ||||
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_keying.c | 8 |
9 files changed, 38 insertions, 38 deletions
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt index d4e083f9ec1..3e29583756f 100644 --- a/source/blender/compositor/CMakeLists.txt +++ b/source/blender/compositor/CMakeLists.txt @@ -340,8 +340,8 @@ set(SRC operations/COM_KeyingOperation.h operations/COM_KeyingScreenOperation.cpp operations/COM_KeyingScreenOperation.h - operations/COM_KeyingDispillOperation.cpp - operations/COM_KeyingDispillOperation.h + operations/COM_KeyingDespillOperation.cpp + operations/COM_KeyingDespillOperation.h operations/COM_ColorSpillOperation.cpp operations/COM_ColorSpillOperation.h diff --git a/source/blender/compositor/nodes/COM_KeyingNode.cpp b/source/blender/compositor/nodes/COM_KeyingNode.cpp index 725060371a1..9e29a99293e 100644 --- a/source/blender/compositor/nodes/COM_KeyingNode.cpp +++ b/source/blender/compositor/nodes/COM_KeyingNode.cpp @@ -26,7 +26,7 @@ #include "COM_ExecutionSystem.h" #include "COM_KeyingOperation.h" -#include "COM_KeyingDispillOperation.h" +#include "COM_KeyingDespillOperation.h" #include "COM_SeparateChannelOperation.h" #include "COM_CombineChannelsOperation.h" @@ -135,18 +135,18 @@ OutputSocket *KeyingNode::setupDilateErode(ExecutionSystem *graph, OutputSocket return dilateErodeOperation->getOutputSocket(0); } -OutputSocket *KeyingNode::setupDispill(ExecutionSystem *graph, OutputSocket *dispillInput, InputSocket *inputScreen, float factor) +OutputSocket *KeyingNode::setupDespill(ExecutionSystem *graph, OutputSocket *despillInput, InputSocket *inputScreen, float factor) { - KeyingDispillOperation *dispillOperation = new KeyingDispillOperation(); + KeyingDespillOperation *despillOperation = new KeyingDespillOperation(); - dispillOperation->setDispillFactor(factor); + despillOperation->setDespillFactor(factor); - addLink(graph, dispillInput, dispillOperation->getInputSocket(0)); - inputScreen->relinkConnections(dispillOperation->getInputSocket(1), 1, graph); + addLink(graph, despillInput, despillOperation->getInputSocket(0)); + inputScreen->relinkConnections(despillOperation->getInputSocket(1), 1, graph); - graph->addOperation(dispillOperation); + graph->addOperation(despillOperation); - return dispillOperation->getOutputSocket(0); + return despillOperation->getOutputSocket(0); } void KeyingNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context) @@ -198,9 +198,9 @@ void KeyingNode::convertToOperations(ExecutionSystem *graph, CompositorContext * postprocessedImage = alphaOperation->getOutputSocket(); - /* dispill output image */ - if (keying_data->dispill_factor > 0.0f) { - postprocessedImage = setupDispill(graph, postprocessedImage, inputScreen, keying_data->dispill_factor); + /* despill output image */ + if (keying_data->despill_factor > 0.0f) { + postprocessedImage = setupDespill(graph, postprocessedImage, inputScreen, keying_data->despill_factor); } /* connect result to output sockets */ diff --git a/source/blender/compositor/nodes/COM_KeyingNode.h b/source/blender/compositor/nodes/COM_KeyingNode.h index 8c1ee8fdf72..894d0ddc095 100644 --- a/source/blender/compositor/nodes/COM_KeyingNode.h +++ b/source/blender/compositor/nodes/COM_KeyingNode.h @@ -36,7 +36,7 @@ protected: OutputSocket *setupPreBlur(ExecutionSystem *graph, InputSocket *inputImage, int size, OutputSocket **originalImage); OutputSocket *setupPostBlur(ExecutionSystem *graph, OutputSocket *postBLurInput, int size); OutputSocket *setupDilateErode(ExecutionSystem *graph, OutputSocket *dilateErodeInput, int distance); - OutputSocket *setupDispill(ExecutionSystem *graph, OutputSocket *dispillInput, InputSocket *inputSrceen, float factor); + OutputSocket *setupDespill(ExecutionSystem *graph, OutputSocket *despillInput, InputSocket *inputSrceen, float factor); public: KeyingNode(bNode *editorNode); void convertToOperations(ExecutionSystem *graph, CompositorContext *context); diff --git a/source/blender/compositor/operations/COM_KeyingDispillOperation.cpp b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp index 5f4eaf3148d..b7fd2772729 100644 --- a/source/blender/compositor/operations/COM_KeyingDispillOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp @@ -21,7 +21,7 @@ * Sergey Sharybin */ -#include "COM_KeyingDispillOperation.h" +#include "COM_KeyingDespillOperation.h" #include "MEM_guardedalloc.h" @@ -40,31 +40,31 @@ static int get_pixel_primary_channel(float *pixel) return 2; } -KeyingDispillOperation::KeyingDispillOperation(): NodeOperation() +KeyingDespillOperation::KeyingDespillOperation(): NodeOperation() { this->addInputSocket(COM_DT_COLOR); this->addInputSocket(COM_DT_COLOR); this->addOutputSocket(COM_DT_COLOR); - this->dispillFactor = 0.5f; + this->despillFactor = 0.5f; this->pixelReader = NULL; this->screenReader = NULL; } -void KeyingDispillOperation::initExecution() +void KeyingDespillOperation::initExecution() { this->pixelReader = this->getInputSocketReader(0); this->screenReader = this->getInputSocketReader(1); } -void KeyingDispillOperation::deinitExecution() +void KeyingDespillOperation::deinitExecution() { this->pixelReader = NULL; this->screenReader = NULL; } -void KeyingDispillOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) +void KeyingDespillOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { float pixelColor[4]; float screenColor[4]; @@ -83,7 +83,7 @@ void KeyingDispillOperation::executePixel(float *color, float x, float y, PixelS color[2] = pixelColor[2]; color[3] = pixelColor[3]; - if (this->dispillFactor * amount > 0) { - color[screen_primary_channel] = pixelColor[screen_primary_channel] - this->dispillFactor * amount; + if (this->despillFactor * amount > 0) { + color[screen_primary_channel] = pixelColor[screen_primary_channel] - this->despillFactor * amount; } } diff --git a/source/blender/compositor/operations/COM_KeyingDispillOperation.h b/source/blender/compositor/operations/COM_KeyingDespillOperation.h index a918a918381..92a1415a1f0 100644 --- a/source/blender/compositor/operations/COM_KeyingDispillOperation.h +++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.h @@ -21,27 +21,27 @@ * Sergey Sharybin */ -#ifndef _COM_KeyingDispillOperation_h -#define _COM_KeyingDispillOperation_h +#ifndef _COM_KeyingDespillOperation_h +#define _COM_KeyingDespillOperation_h #include "COM_NodeOperation.h" /** - * Class with implementation of keying dispill node + * Class with implementation of keying despill node */ -class KeyingDispillOperation : public NodeOperation { +class KeyingDespillOperation : public NodeOperation { protected: SocketReader *pixelReader; SocketReader *screenReader; - float dispillFactor; + float despillFactor; public: - KeyingDispillOperation(); + KeyingDespillOperation(); void initExecution(); void deinitExecution(); - void setDispillFactor(float value) {this->dispillFactor = value;} + void setDespillFactor(float value) {this->despillFactor = value;} void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]); }; diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 341926f50a3..4c5befda8df 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -2417,7 +2417,7 @@ static void node_composit_buts_keying(uiLayout *layout, bContext *UNUSED(C), Poi bNode *node= ptr->data; uiItemR(layout, ptr, "blur_pre", 0, NULL, ICON_NONE); - uiItemR(layout, ptr, "dispill_factor", 0, NULL, ICON_NONE); + uiItemR(layout, ptr, "despill_factor", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "clip_black", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "clip_white", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "dilate_distance", 0, NULL, ICON_NONE); diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index bad40e80265..d605e9ac38f 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -622,7 +622,7 @@ typedef struct NodeKeyingScreenData { } NodeKeyingScreenData; typedef struct NodeKeyingData { - float dispill_factor; + float despill_factor; float clip_black, clip_white; int dilate_distance; int blur_pre, blur_post; diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 7d2935ece6e..8cd56983d6c 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -3073,10 +3073,10 @@ static void def_cmp_keying(StructRNA *srna) RNA_def_struct_sdna_from(srna, "NodeKeyingData", "storage"); - prop = RNA_def_property(srna, "dispill_factor", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "dispill_factor"); + prop = RNA_def_property(srna, "despill_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "despill_factor"); RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Dispill", ""); + RNA_def_property_ui_text(prop, "Despill", ""); RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "clip_black", PROP_FLOAT, PROP_FACTOR); diff --git a/source/blender/nodes/composite/nodes/node_composite_keying.c b/source/blender/nodes/composite/nodes/node_composite_keying.c index 8e6fd86eae5..b5f9b823ac2 100644 --- a/source/blender/nodes/composite/nodes/node_composite_keying.c +++ b/source/blender/nodes/composite/nodes/node_composite_keying.c @@ -97,7 +97,7 @@ static void do_key(bNode *node, float *out, float *pixel, float *screen) NodeKeyingData *data = node->storage; float screen_balance = 0.5f; - float dispill_factor = data->dispill_factor; + float despill_factor = data->despill_factor; float clip_black = data->clip_black; float clip_white = data->clip_white; @@ -109,7 +109,7 @@ static void do_key(bNode *node, float *out, float *pixel, float *screen) if (primary_channel != screen_primary_channel) { /* different main channel means pixel is on foreground, * but screen color still need to be despilled from it */ - despil_pixel(out, pixel, screen, dispill_factor); + despil_pixel(out, pixel, screen, despill_factor); out[3] = 1.0f; } else if (saturation >= screen_saturation) { @@ -122,7 +122,7 @@ static void do_key(bNode *node, float *out, float *pixel, float *screen) else { float distance; - despil_pixel(out, pixel, screen, dispill_factor); + despil_pixel(out, pixel, screen, despill_factor); distance = 1.0f - saturation / screen_saturation; @@ -196,7 +196,7 @@ static void node_composit_init_keying(bNodeTree *UNUSED(ntree), bNode* node, bNo data = MEM_callocN(sizeof(NodeKeyingData), "node keying data"); - data->dispill_factor = 1.0f; + data->despill_factor = 1.0f; data->clip_black = 0.0f; data->clip_white = 1.0f; |