Cleanup: comment line length (editors)
[blender.git] / source / blender / compositor / nodes / COM_MapUVNode.cpp
index e0e7e2594edd9d1464199734df290e2c136df7f4..a5f7165db446e546892c71a5c4510a6497890cca 100644 (file)
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
- * Contributor: 
- *             Dalai Felinto
+ * Contributor:
+ *      Dalai Felinto
  */
 
 #include "COM_MapUVNode.h"
 #include "COM_MapUVOperation.h"
 #include "COM_ExecutionSystem.h"
 
-MapUVNode::MapUVNode(bNode *editorNode): Node(editorNode)
+MapUVNode::MapUVNode(bNode *editorNode) : Node(editorNode)
 {
+       /* pass */
 }
 
-void MapUVNode::convertToOperations(ExecutionSystem *graph, CompositorContext * context)
+void MapUVNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const
 {
-       MapUVOperation *operation = new MapUVOperation();
-
-       this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0), 0, graph);
-       this->getInputSocket(1)->relinkConnections(operation->getInputSocket(1), 1, graph);
-       this->getOutputSocket(0)->relinkConnections(operation->getOutputSocket());
-       
        bNode *node = this->getbNode();
+
+       MapUVOperation *operation = new MapUVOperation();
        operation->setAlpha((float)node->custom1);
        operation->setResolutionInputSocketIndex(1);
+       converter.addOperation(operation);
 
-       graph->addOperation(operation);
+       converter.mapInputSocket(getInputSocket(0), operation->getInputSocket(0));
+       converter.mapInputSocket(getInputSocket(1), operation->getInputSocket(1));
+       converter.mapOutputSocket(getOutputSocket(0), operation->getOutputSocket());
 }