diff options
author | Monique Dewanchand <m.dewanchand@atmind.nl> | 2013-01-31 19:08:37 +0400 |
---|---|---|
committer | Monique Dewanchand <m.dewanchand@atmind.nl> | 2013-01-31 19:08:37 +0400 |
commit | a5cef69a0dc0b86d13d2fd16695db77094804c96 (patch) | |
tree | 14b0cc6af503f4f2ed6cbecd023effa77a7378ee /source/blender/compositor/nodes | |
parent | 3a4c317b877c3c5c061808d2aa8a437fe30d5eee (diff) |
Apply patch [#33999] Wrapping mode for the "translate" compositing node
this patch enables the translate node to wrap around the image borders. This is especially needed if the translate node is not used to position elements on a layer but when it is used instead for seamless backgrounds like mountains or clouds that should be repeated over time (by animating the x/y values).
No trunk without docs! So here is my documentation: http://wiki.blender.org/index.php/User:Plasmasolutions/TranslateNodeExtension
The code is properly documented and should be easy to read and understand. When there are any problems or issues, please comment, I'll tackle them right away!
Greetings, Thomas Beck
* optimized determination dependant areas
* fixed some issues with scale node
There are still some issues when scaling very small values (x=0.0001)
- At Mind -
Diffstat (limited to 'source/blender/compositor/nodes')
-rw-r--r-- | source/blender/compositor/nodes/COM_TranslateNode.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/compositor/nodes/COM_TranslateNode.cpp b/source/blender/compositor/nodes/COM_TranslateNode.cpp index c805f8f8baa..1d21b23fa74 100644 --- a/source/blender/compositor/nodes/COM_TranslateNode.cpp +++ b/source/blender/compositor/nodes/COM_TranslateNode.cpp @@ -37,10 +37,15 @@ void TranslateNode::convertToOperations(ExecutionSystem *graph, CompositorContex InputSocket *inputYSocket = this->getInputSocket(2); OutputSocket *outputSocket = this->getOutputSocket(0); TranslateOperation *operation = new TranslateOperation(); - + + bNode *editorNode = this->getbNode(); + NodeTranslateData *data = (NodeTranslateData *)editorNode->storage; + operation->setWrapping(data->wrap_axis); + inputSocket->relinkConnections(operation->getInputSocket(0), 0, graph); inputXSocket->relinkConnections(operation->getInputSocket(1), 1, graph); inputYSocket->relinkConnections(operation->getInputSocket(2), 2, graph); outputSocket->relinkConnections(operation->getOutputSocket(0)); graph->addOperation(operation); } + |