From 03687b7c66d7064870bbe8d01f889c85de1fad7d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 4 Feb 2013 16:12:42 +0000 Subject: 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. --- source/blender/compositor/operations/COM_TranslateOperation.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/compositor/operations/COM_TranslateOperation.cpp') diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cpp b/source/blender/compositor/operations/COM_TranslateOperation.cpp index 253c5df8f9d..27651a772ee 100644 --- a/source/blender/compositor/operations/COM_TranslateOperation.cpp +++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp @@ -34,6 +34,8 @@ TranslateOperation::TranslateOperation() : NodeOperation() this->m_inputXOperation = NULL; this->m_inputYOperation = NULL; this->m_isDeltaSet = false; + this->m_factorX = 1.0f; + this->m_factorY = 1.0f; } void TranslateOperation::initExecution() { @@ -180,3 +182,10 @@ float TranslateOperation::getWrappedOriginalYPos(float y) while (originalYPos < 0) originalYPos += this->m_height; return fmodf(originalYPos, this->getHeight()); } + +float TranslateOperation::setFactorXY(float factorX, float factorY) +{ + m_factorX = factorX; + m_factorY = factorY; +} + -- cgit v1.2.3