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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-04 20:12:42 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-04 20:12:42 +0400
commit03687b7c66d7064870bbe8d01f889c85de1fad7d (patch)
treeb5a081058b582e3d40b79e58f2c601f31394ea7c /source/blender/compositor/operations/COM_TranslateOperation.h
parent7c9d99334705498932a272f68f74121953d4974a (diff)
Compositor "Relative" option for Translate node, same as for other nodes this
makes it possible to specify an offset relative to the render resolution (so 0.5 is half the image rather than giving the number of pixels). It's a bit late but it's a trivial change and needed for 4k mango render.
Diffstat (limited to 'source/blender/compositor/operations/COM_TranslateOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.h b/source/blender/compositor/operations/COM_TranslateOperation.h
index d93f09e2ab6..4512f97550c 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.h
+++ b/source/blender/compositor/operations/COM_TranslateOperation.h
@@ -35,6 +35,8 @@ private:
bool m_isDeltaSet;
float m_relativeOffsetX;
float m_relativeOffsetY;
+ float m_factorX;
+ float m_factorY;
char m_wrappingType;
public:
TranslateOperation();
@@ -44,8 +46,8 @@ public:
void initExecution();
void deinitExecution();
- float getDeltaX() { return this->m_deltaX; }
- float getDeltaY() { return this->m_deltaY; }
+ float getDeltaX() { return this->m_deltaX * this->m_factorX; }
+ float getDeltaY() { return this->m_deltaY * this->m_factorY; }
inline void ensureDelta() {
if (!this->m_isDeltaSet) {
@@ -61,6 +63,8 @@ public:
void setWrapping(char wrapping_type);
float getWrappedOriginalXPos(float x);
float getWrappedOriginalYPos(float y);
+
+ float setFactorXY(float factorX, float factorY);
};
#endif