diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-06 17:45:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-06 17:45:11 +0400 |
commit | 2b8ac9bc616d9a9cd8f303228efc30fdc9dd38a1 (patch) | |
tree | 96d17992548f206d12feca81d911ca7c82b131fb /source/blender/nodes | |
parent | 731c6ebec441ac577498e5673679df9e2a7d9bee (diff) |
inpaint node from tomato branch by Peter Schlaile
http://en.wikipedia.org/wiki/Inpainting
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/nodes/NOD_composite.h | 1 | ||||
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_inpaint.c | 61 |
3 files changed, 63 insertions, 0 deletions
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index e8dd4acb63b..d95751af82f 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -74,6 +74,7 @@ set(SRC composite/nodes/node_composite_huecorrect.c composite/nodes/node_composite_idMask.c composite/nodes/node_composite_image.c + composite/nodes/node_composite_inpaint.c composite/nodes/node_composite_invert.c composite/nodes/node_composite_keyingscreen.c composite/nodes/node_composite_keying.c diff --git a/source/blender/nodes/NOD_composite.h b/source/blender/nodes/NOD_composite.h index 3b4fa49ea05..92e547288c9 100644 --- a/source/blender/nodes/NOD_composite.h +++ b/source/blender/nodes/NOD_composite.h @@ -80,6 +80,7 @@ void register_node_type_cmp_dblur(struct bNodeTreeType *ttype); void register_node_type_cmp_bilateralblur(struct bNodeTreeType *ttype); void register_node_type_cmp_vecblur(struct bNodeTreeType *ttype); void register_node_type_cmp_dilateerode(struct bNodeTreeType *ttype); +void register_node_type_cmp_inpaint(struct bNodeTreeType *ttype); void register_node_type_cmp_defocus(struct bNodeTreeType *ttype); void register_node_type_cmp_valtorgb(struct bNodeTreeType *ttype); diff --git a/source/blender/nodes/composite/nodes/node_composite_inpaint.c b/source/blender/nodes/composite/nodes/node_composite_inpaint.c new file mode 100644 index 00000000000..dc4177bd2a4 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_inpaint.c @@ -0,0 +1,61 @@ +/* + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + +/** \file blender/nodes/composite/nodes/node_composite_inpaint.c + * \ingroup cmpnodes + */ + + +#include "node_composite_util.h" + + +/* **************** Inpaint/ ******************** */ + +static bNodeSocketTemplate cmp_node_inpaint_in[] = { + {SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f}, + { -1, 0, "" } +}; +static bNodeSocketTemplate cmp_node_inpaint_out[] = { + {SOCK_RGBA, 0, N_("Image")}, + { -1, 0, "" } +}; + +static void node_composit_exec_inpaint(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out)) +{ +} + +void register_node_type_cmp_inpaint(bNodeTreeType *ttype) +{ + static bNodeType ntype; + + node_type_base(ttype, &ntype, CMP_NODE_INPAINT, "Inpaint", NODE_CLASS_OP_FILTER, NODE_OPTIONS); + node_type_socket_templates(&ntype, cmp_node_inpaint_in, cmp_node_inpaint_out); + node_type_size(&ntype, 130, 100, 320); + node_type_exec(&ntype, node_composit_exec_inpaint); + + nodeRegisterType(ttype, &ntype); +} |