From a5cef69a0dc0b86d13d2fd16695db77094804c96 Mon Sep 17 00:00:00 2001 From: Monique Dewanchand Date: Thu, 31 Jan 2013 15:08:37 +0000 Subject: 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 - --- source/blender/compositor/operations/COM_TranslateOperation.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/compositor/operations/COM_TranslateOperation.h') diff --git a/source/blender/compositor/operations/COM_TranslateOperation.h b/source/blender/compositor/operations/COM_TranslateOperation.h index faaadb1ced2..d93f09e2ab6 100644 --- a/source/blender/compositor/operations/COM_TranslateOperation.h +++ b/source/blender/compositor/operations/COM_TranslateOperation.h @@ -33,6 +33,9 @@ private: float m_deltaX; float m_deltaY; bool m_isDeltaSet; + float m_relativeOffsetX; + float m_relativeOffsetY; + char m_wrappingType; public: TranslateOperation(); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); @@ -54,6 +57,10 @@ public: this->m_isDeltaSet = true; } } + + void setWrapping(char wrapping_type); + float getWrappedOriginalXPos(float x); + float getWrappedOriginalYPos(float y); }; #endif -- cgit v1.2.3