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/intern/COM_NodeOperation.cpp')
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/source/blender/compositor/intern/COM_NodeOperation.cpp b/source/blender/compositor/intern/COM_NodeOperation.cpp
index bae884d713e..4ae114bd031 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperation.cpp
@@ -124,19 +124,26 @@ bool NodeOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOper
return false;
}
else {
- unsigned int index;
- vector<InputSocket *> &inputsockets = this->getInputSockets();
-
- for (index = 0; index < inputsockets.size(); index++) {
- InputSocket *inputsocket = inputsockets[index];
- if (inputsocket->isConnected()) {
- NodeOperation *inputoperation = (NodeOperation *)inputsocket->getConnection()->getFromNode();
- bool result = inputoperation->determineDependingAreaOfInterest(input, readOperation, output);
- if (result) {
- return true;
+ rcti tempOutput;
+ bool first = true;
+ for (int i = 0 ; i < getNumberOfInputSockets() ; i ++) {
+ NodeOperation * inputOperation = this->getInputOperation(i);
+ if (inputOperation && inputOperation->determineDependingAreaOfInterest(input, readOperation, &tempOutput)) {
+ if (first) {
+ output->xmin = tempOutput.xmin;
+ output->ymin = tempOutput.ymin;
+ output->xmax = tempOutput.xmax;
+ output->ymax = tempOutput.ymax;
+ first = false;
+ }
+ else {
+ output->xmin = MIN2(output->xmin, tempOutput.xmin);
+ output->ymin = MIN2(output->ymin, tempOutput.ymin);
+ output->xmax = MAX2(output->xmax, tempOutput.xmax);
+ output->ymax = MAX2(output->ymax, tempOutput.ymax);
}
}
}
- return false;
+ return !first;
}
}