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/intern/COM_ExecutionSystem.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/intern/COM_ExecutionSystem.cpp')
-rw-r--r--source/blender/compositor/intern/COM_ExecutionSystem.cpp36
1 files changed, 28 insertions, 8 deletions
diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
index 8c0b37a0685..1056c6d3f65 100644
--- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp
@@ -41,7 +41,14 @@
ExecutionSystem::ExecutionSystem(bNodeTree *editingtree, bool rendering)
{
- this->context.setbNodeTree(editingtree);
+ context.setbNodeTree(editingtree);
+ bNode* gnode;
+ for (gnode = (bNode*)editingtree->nodes.first ; gnode ; gnode = (bNode*)gnode->next) {
+ if (gnode->type == NODE_GROUP && gnode->typeinfo->group_edit_get(gnode)) {
+ context.setActivegNode(gnode);
+ break;
+ }
+ }
/* initialize the CompositorContext */
if (rendering) {
@@ -55,25 +62,25 @@ ExecutionSystem::ExecutionSystem(bNodeTree *editingtree, bool rendering)
Node *mainOutputNode=NULL;
- mainOutputNode = ExecutionSystemHelper::addbNodeTree(*this, 0, editingtree);
+ mainOutputNode = ExecutionSystemHelper::addbNodeTree(*this, 0, editingtree, NULL);
if (mainOutputNode) {
context.setScene((Scene*)mainOutputNode->getbNode()->id);
this->convertToOperations();
this->groupOperations(); /* group operations in ExecutionGroups */
- vector<ExecutionGroup*> executionGroups;
- this->findOutputExecutionGroup(&executionGroups);
unsigned int index;
unsigned int resolution[2];
- for (index = 0 ; index < executionGroups.size(); index ++) {
+ for (index = 0 ; index < this->groups.size(); index ++) {
resolution[0]=0;
resolution[1]=0;
- ExecutionGroup *executionGroup = executionGroups[index];
+ ExecutionGroup *executionGroup = groups[index];
executionGroup->determineResolution(resolution);
}
}
- if (G.f & G_DEBUG) ExecutionSystemHelper::debugDump(this);
+#ifdef COM_DEBUG
+ ExecutionSystemHelper::debugDump(this);
+#endif
}
ExecutionSystem::~ExecutionSystem()
@@ -180,11 +187,13 @@ void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation)
writeoperation->setbNodeTree(this->getContext().getbNodeTree());
this->addOperation(writeoperation);
ExecutionSystemHelper::addLink(this->getConnections(), fromsocket, writeoperation->getInputSocket(0));
+ writeoperation->readResolutionFromInputSocket();
}
ReadBufferOperation *readoperation = new ReadBufferOperation();
readoperation->setMemoryProxy(writeoperation->getMemoryProxy());
connection->setFromSocket(readoperation->getOutputSocket());
readoperation->getOutputSocket()->addConnection(connection);
+ readoperation->readResolutionFromWriteBuffer();
this->addOperation(readoperation);
}
}
@@ -207,9 +216,11 @@ void ExecutionSystem::addReadWriteBufferOperations(NodeOperation *operation)
readoperation->setMemoryProxy(writeOperation->getMemoryProxy());
connection->setFromSocket(readoperation->getOutputSocket());
readoperation->getOutputSocket()->addConnection(connection);
+ readoperation->readResolutionFromWriteBuffer();
this->addOperation(readoperation);
}
ExecutionSystemHelper::addLink(this->getConnections(), outputsocket, writeOperation->getInputSocket(0));
+ writeOperation->readResolutionFromInputSocket();
}
}
@@ -237,7 +248,16 @@ void ExecutionSystem::convertToOperations()
// determine all resolutions of the operations (Width/Height)
for (index = 0 ; index < this->operations.size(); index ++) {
NodeOperation *operation = this->operations[index];
- if (operation->isOutputOperation(context.isRendering())) {
+ if (operation->isOutputOperation(context.isRendering()) && !operation->isPreviewOperation()) {
+ unsigned int resolution[2] = {0,0};
+ unsigned int preferredResolution[2] = {0,0};
+ operation->determineResolution(resolution, preferredResolution);
+ operation->setResolution(resolution);
+ }
+ }
+ for (index = 0 ; index < this->operations.size(); index ++) {
+ NodeOperation *operation = this->operations[index];
+ if (operation->isOutputOperation(context.isRendering()) && operation->isPreviewOperation()) {
unsigned int resolution[2] = {0,0};
unsigned int preferredResolution[2] = {0,0};
operation->determineResolution(resolution, preferredResolution);