[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46092] branches/tile/source/blender: TileBranch
Jeroen Bakker
j.bakker at atmind.nl
Sun Apr 29 23:47:43 CEST 2012
Revision: 46092
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46092
Author: jbakker
Date: 2012-04-29 21:47:41 +0000 (Sun, 29 Apr 2012)
Log Message:
-----------
TileBranch
* Added the crop node
- still needs some work with the crop image size
* Added the Double Edge Mask
* Changed the max tile size of the compositor
These were the last two nodes. now let's start with the clean up and bug fixing...
- At Mind -
Jeroen & Monique.
Modified Paths:
--------------
branches/tile/source/blender/compositor/CMakeLists.txt
branches/tile/source/blender/compositor/intern/COM_Converter.cpp
branches/tile/source/blender/makesrna/intern/rna_nodetree.c
Added Paths:
-----------
branches/tile/source/blender/compositor/nodes/COM_CropNode.cpp
branches/tile/source/blender/compositor/nodes/COM_CropNode.h
branches/tile/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp
branches/tile/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h
branches/tile/source/blender/compositor/operations/COM_CropOperation.cpp
branches/tile/source/blender/compositor/operations/COM_CropOperation.h
branches/tile/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
branches/tile/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
Modified: branches/tile/source/blender/compositor/CMakeLists.txt
===================================================================
--- branches/tile/source/blender/compositor/CMakeLists.txt 2012-04-29 20:07:29 UTC (rev 46091)
+++ branches/tile/source/blender/compositor/CMakeLists.txt 2012-04-29 21:47:41 UTC (rev 46092)
@@ -181,6 +181,11 @@
nodes/COM_GlareNode.cpp
nodes/COM_GlareNode.h
+ nodes/COM_CropNode.cpp
+ nodes/COM_CropNode.h
+ operations/COM_CropOperation.cpp
+ operations/COM_CropOperation.h
+
operations/COM_LensGlowOperation.cpp
operations/COM_LensGlowOperation.h
operations/COM_LensGhostOperation.cpp
@@ -312,13 +317,17 @@
operations/COM_GammaCorrectOperation.cpp
# Matte nodes
-nodes/COM_BoxMaskNode.cpp
-nodes/COM_BoxMaskNode.h
-nodes/COM_EllipseMaskNode.cpp
-nodes/COM_EllipseMaskNode.h
-nodes/COM_ColorSpillNode.cpp
-nodes/COM_ColorSpillNode.h
+ nodes/COM_BoxMaskNode.cpp
+ nodes/COM_BoxMaskNode.h
+ nodes/COM_EllipseMaskNode.cpp
+ nodes/COM_EllipseMaskNode.h
+ nodes/COM_ColorSpillNode.cpp
+ nodes/COM_ColorSpillNode.h
+ nodes/COM_DoubleEdgeMaskNode.cpp
+ nodes/COM_DoubleEdgeMaskNode.h
+ operations/COM_DoubleEdgeMaskOperation.cpp
+ operations/COM_DoubleEdgeMaskOperation.h
operations/COM_ColorSpillOperation.cpp
operations/COM_ColorSpillOperation.h
operations/COM_RenderLayersBaseProg.cpp
Modified: branches/tile/source/blender/compositor/intern/COM_Converter.cpp
===================================================================
--- branches/tile/source/blender/compositor/intern/COM_Converter.cpp 2012-04-29 20:07:29 UTC (rev 46091)
+++ branches/tile/source/blender/compositor/intern/COM_Converter.cpp 2012-04-29 21:47:41 UTC (rev 46092)
@@ -111,6 +111,8 @@
#include "COM_MovieDistortionNode.h"
#include "COM_ViewLevelsNode.h"
#include "COM_DefocusNode.h"
+#include "COM_DoubleEdgeMaskNode.h"
+#include "COM_CropNode.h"
Node* Converter::convert(bNode *bNode) {
Node * node;
@@ -343,9 +345,13 @@
case CMP_NODE_DEFOCUS:
node = new DefocusNode(bNode);
break;
- /* not inplemented yet */
case CMP_NODE_DOUBLEEDGEMASK:
+ node = new DoubleEdgeMaskNode(bNode);
+ break;
case CMP_NODE_CROP:
+ node = new CropNode(bNode);
+ break;
+ /* not inplemented yet */
default:
node = new MuteNode(bNode);
break;
Added: branches/tile/source/blender/compositor/nodes/COM_CropNode.cpp
===================================================================
--- branches/tile/source/blender/compositor/nodes/COM_CropNode.cpp (rev 0)
+++ branches/tile/source/blender/compositor/nodes/COM_CropNode.cpp 2012-04-29 21:47:41 UTC (rev 46092)
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * 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.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#include "COM_CropNode.h"
+#include "COM_CropOperation.h"
+
+
+CropNode::CropNode(bNode *editorNode) : Node(editorNode) {
+}
+
+void CropNode::convertToOperations(ExecutionSystem *graph, CompositorContext * context){
+ bNode* node = getbNode();
+ NodeTwoXYs *cropSettings = (NodeTwoXYs*)node->storage;
+ bool relative = (bool)node->custom2;
+ bool cropImage = (bool)node->custom1;
+ CropBaseOperation *operation;
+ if (cropImage){
+ operation = new CropImageOperation();
+ } else {
+ operation = new CropOperation();
+ }
+ operation->setCropSettings(cropSettings);
+ operation->setRelative(relative);
+ this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0), true, 0, graph);
+ this->getOutputSocket()->relinkConnections(operation->getOutputSocket());
+ graph->addOperation(operation);
+}
Added: branches/tile/source/blender/compositor/nodes/COM_CropNode.h
===================================================================
--- branches/tile/source/blender/compositor/nodes/COM_CropNode.h (rev 0)
+++ branches/tile/source/blender/compositor/nodes/COM_CropNode.h 2012-04-29 21:47:41 UTC (rev 46092)
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * 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.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#ifndef _COM_CropNode_h_
+#define _COM_CropNode_h_
+
+#include "COM_Node.h"
+
+class CropNode: public Node {
+public:
+ CropNode(bNode *editorNode);
+ void convertToOperations(ExecutionSystem* graph, CompositorContext * context);
+};
+
+#endif
+
+
Added: branches/tile/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp
===================================================================
--- branches/tile/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp (rev 0)
+++ branches/tile/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp 2012-04-29 21:47:41 UTC (rev 46092)
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * 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.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#include "COM_DoubleEdgeMaskNode.h"
+#include "COM_DoubleEdgeMaskOperation.h"
+#include "DNA_scene_types.h"
+#include "COM_ExecutionSystem.h"
+
+DoubleEdgeMaskNode::DoubleEdgeMaskNode(bNode *editorNode): Node(editorNode) {
+}
+
+void DoubleEdgeMaskNode::convertToOperations(ExecutionSystem *system, CompositorContext * context) {
+ DoubleEdgeMaskOperation *operation;
+ bNode* bnode = this->getbNode();
+
+ operation = new DoubleEdgeMaskOperation();
+ operation->setAdjecentOnly(bnode->custom1);
+ operation->setKeepInside(bnode->custom2);
+
+ this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0), true, 0, system);
+ this->getInputSocket(1)->relinkConnections(operation->getInputSocket(1), true, 1, system);
+ this->getOutputSocket(0)->relinkConnections(operation->getOutputSocket(0));
+ system->addOperation(operation);
+}
Added: branches/tile/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h
===================================================================
--- branches/tile/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h (rev 0)
+++ branches/tile/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h 2012-04-29 21:47:41 UTC (rev 46092)
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * 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.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ */
+
+#ifndef _COM_DoubleEdgeMaskNode_h_
+#define _COM_DoubleEdgeMaskNode_h_
+
+#include "COM_Node.h"
+
+/**
+ * @brief DoubleEdgeMaskNode
+ * @ingroup Node
+ */
+class DoubleEdgeMaskNode: public Node {
+public:
+ DoubleEdgeMaskNode(bNode *editorNode);
+ void convertToOperations(ExecutionSystem* graph, CompositorContext * context);
+};
+
+#endif
Added: branches/tile/source/blender/compositor/operations/COM_CropOperation.cpp
===================================================================
--- branches/tile/source/blender/compositor/operations/COM_CropOperation.cpp (rev 0)
+++ branches/tile/source/blender/compositor/operations/COM_CropOperation.cpp 2012-04-29 21:47:41 UTC (rev 46092)
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2011, Blender Foundation.
+ *
+ * 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,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list