diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-23 11:02:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-23 11:02:11 +0400 |
commit | 4e772065d7e17e53e31d04816eef7c4468835c82 (patch) | |
tree | 89606d02fd79cc4637514d940ae3186cdd67d61f /source | |
parent | 1ab5a4f0edb1e39de4d6adc1f874e2bfcdead243 (diff) |
set defaults for de-speckle
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/compositor/operations/COM_DespeckleOperation.cpp | 4 | ||||
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_despeckle.c | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_DespeckleOperation.cpp b/source/blender/compositor/operations/COM_DespeckleOperation.cpp index 6e2f9ab4351..8a18e4e2330 100644 --- a/source/blender/compositor/operations/COM_DespeckleOperation.cpp +++ b/source/blender/compositor/operations/COM_DespeckleOperation.cpp @@ -128,8 +128,8 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void *data) bool DespeckleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) { rcti newInput; - int addx = 1; //(this->m_filterWidth - 1) / 2 + 1; - int addy = 1; //(this->m_filterHeight - 1) / 2 + 1; + int addx = 2; //(this->m_filterWidth - 1) / 2 + 1; + int addy = 2; //(this->m_filterHeight - 1) / 2 + 1; newInput.xmax = input->xmax + addx; newInput.xmin = input->xmin - addx; newInput.ymax = input->ymax + addy; diff --git a/source/blender/nodes/composite/nodes/node_composite_despeckle.c b/source/blender/nodes/composite/nodes/node_composite_despeckle.c index c1861ca9d86..86c5a0b467c 100644 --- a/source/blender/nodes/composite/nodes/node_composite_despeckle.c +++ b/source/blender/nodes/composite/nodes/node_composite_despeckle.c @@ -51,6 +51,12 @@ static void node_composit_exec_despeckle(void *UNUSED(data), bNode *UNUSED(node) #endif /* WITH_COMPOSITOR_LEGACY */ +static void node_composit_init_despeckle(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp)) +{ + node->custom3 = 0.5f; + node->custom4 = 0.5f; +} + void register_node_type_cmp_despeckle(bNodeTreeType *ttype) { static bNodeType ntype; @@ -58,6 +64,7 @@ void register_node_type_cmp_despeckle(bNodeTreeType *ttype) node_type_base(ttype, &ntype, CMP_NODE_DESPECKLE, "Despeckle", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS); node_type_socket_templates(&ntype, cmp_node_despeckle_in, cmp_node_despeckle_out); node_type_size(&ntype, 80, 40, 120); + node_type_init(&ntype, node_composit_init_despeckle); #ifdef WITH_COMPOSITOR_LEGACY node_type_exec(&ntype, node_composit_exec_despeckle); #endif |