Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-23 10:48:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-23 10:48:01 +0400
commit1ab5a4f0edb1e39de4d6adc1f874e2bfcdead243 (patch)
tree3bedae156da6c4f22b32285937277b7a896db442 /source/blender/nodes
parent45a0287f45e48d2a6224ec73f6d58890344b1ca3 (diff)
despeckle composite node
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/CMakeLists.txt1
-rw-r--r--source/blender/nodes/NOD_composite.h1
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_despeckle.c66
3 files changed, 68 insertions, 0 deletions
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index 64987a52a21..e1adb419a8a 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -59,6 +59,7 @@ set(SRC
composite/nodes/node_composite_composite.c
composite/nodes/node_composite_crop.c
composite/nodes/node_composite_curves.c
+ composite/nodes/node_composite_despeckle.c
composite/nodes/node_composite_doubleEdgeMask.c
composite/nodes/node_composite_defocus.c
composite/nodes/node_composite_diffMatte.c
diff --git a/source/blender/nodes/NOD_composite.h b/source/blender/nodes/NOD_composite.h
index 92e547288c9..bcef230e1d0 100644
--- a/source/blender/nodes/NOD_composite.h
+++ b/source/blender/nodes/NOD_composite.h
@@ -81,6 +81,7 @@ 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_despeckle(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_despeckle.c b/source/blender/nodes/composite/nodes/node_composite_despeckle.c
new file mode 100644
index 00000000000..c1861ca9d86
--- /dev/null
+++ b/source/blender/nodes/composite/nodes/node_composite_despeckle.c
@@ -0,0 +1,66 @@
+/*
+ * ***** 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_despeckle.c
+ * \ingroup cmpnodes
+ */
+
+#include "node_composite_util.h"
+
+/* **************** FILTER ******************** */
+static bNodeSocketTemplate cmp_node_despeckle_in[]= {
+ { SOCK_FLOAT, 1, N_("Fac"), 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, N_("Image"), 1.0f, 1.0f, 1.0f, 1.0f},
+ { -1, 0, "" }
+};
+static bNodeSocketTemplate cmp_node_despeckle_out[]= {
+ { SOCK_RGBA, 0, N_("Image")},
+ { -1, 0, "" }
+};
+
+#ifdef WITH_COMPOSITOR_LEGACY
+
+static void node_composit_exec_despeckle(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
+{
+ /* pass */
+}
+
+#endif /* WITH_COMPOSITOR_LEGACY */
+
+void register_node_type_cmp_despeckle(bNodeTreeType *ttype)
+{
+ static bNodeType ntype;
+
+ 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);
+#ifdef WITH_COMPOSITOR_LEGACY
+ node_type_exec(&ntype, node_composit_exec_despeckle);
+#endif
+
+ nodeRegisterType(ttype, &ntype);
+}