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:
authorJeroen Bakker <j.bakker@atmind.nl>2012-06-12 08:23:21 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-06-12 08:23:21 +0400
commitac5a735e3fe9fe29e38e3a20c20da87b27feb112 (patch)
tree52059f3dbc9827eb498abe772e763e541b3b3608 /source/blender/compositor/operations/COM_TranslateOperation.cpp
parent7977078227d6da77e294dd860f4685387f0bae56 (diff)
* FIX for
- [#31777] Border Crop gives black - [#31768] Crash when connecting a Math node to a translate node in Tiles comp - [#31638] View node in new node compo system crashes when inside a group * make sure a very fast vignette can be made by using a EliipseMask + Fast Gaussian blur
Diffstat (limited to 'source/blender/compositor/operations/COM_TranslateOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cpp b/source/blender/compositor/operations/COM_TranslateOperation.cpp
index 6d2fdfc11d0..b9b06d6d356 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.cpp
+++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp
@@ -32,6 +32,7 @@ TranslateOperation::TranslateOperation() : NodeOperation()
this->inputOperation = NULL;
this->inputXOperation = NULL;
this->inputYOperation = NULL;
+ this->isDeltaSet = false;
}
void TranslateOperation::initExecution()
{
@@ -39,11 +40,6 @@ void TranslateOperation::initExecution()
this->inputXOperation = this->getInputSocketReader(1);
this->inputYOperation = this->getInputSocketReader(2);
- 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];
}
void TranslateOperation::deinitExecution()
@@ -56,11 +52,13 @@ void TranslateOperation::deinitExecution()
void TranslateOperation::executePixel(float *color,float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
+ ensureDelta();
this->inputOperation->read(color, x-this->getDeltaX(), y-this->getDeltaY(), sampler, inputBuffers);
}
bool TranslateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)
{
+ ensureDelta();
rcti newInput;
newInput.xmax = input->xmax - this->getDeltaX();