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:
Diffstat (limited to 'source/blender/compositor/operations/COM_TranslateOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.h b/source/blender/compositor/operations/COM_TranslateOperation.h
index eab3391041e..63d6ee0d0b5 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.h
+++ b/source/blender/compositor/operations/COM_TranslateOperation.h
@@ -32,6 +32,7 @@ private:
SocketReader*inputYOperation;
float deltaX;
float deltaY;
+ float isDeltaSet;
public:
TranslateOperation();
bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
@@ -42,6 +43,17 @@ public:
float getDeltaX() {return this->deltaX;}
float getDeltaY() {return this->deltaY;}
+
+ inline void ensureDelta() {
+ if (!isDeltaSet) {
+ float tempDelta[4];
+ this->inputXOperation->read(tempDelta, 0, 0, COM_PS_NEAREST, NULL);
+ this->deltaX = tempDelta[0];
+ this->inputYOperation->read(tempDelta, 0, 0, COM_PS_NEAREST, NULL);
+ this->deltaY = tempDelta[0];
+ this->isDeltaSet = true;
+ }
+ }
};
#endif