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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-12-27 00:30:48 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-12-27 00:32:56 +0400
commit79d8f1e4a5ca824b7c2d8f1f0106818c68cbbfa1 (patch)
treee09024cd312bcc2570b835ce047e19cdb30635cb
parentfeac8ee09059d50262e5d45d1f88f20476e80735 (diff)
Fix T37955: Freestyle render misalignment
Issue was caused by missing objects update for temporary freestyle objects. This happened because of the fact that such objects doesn't have any relations, as in they're corresponding to root nodes in the DAG. This situation wasn't handled by DAG_threaded_update_begin() which considered there's only one root node in the DAG.
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 8074d6bceec..6376878c664 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -2735,7 +2735,7 @@ void DAG_threaded_update_begin(Scene *scene,
void (*func)(void *node, void *user_data),
void *user_data)
{
- DagNode *node, *root_node;
+ DagNode *node;
/* We reset num_pending_parents to zero first and tag node as not scheduled yet... */
for (node = scene->theDag->DagNode.first; node; node = node->next) {
@@ -2756,10 +2756,15 @@ void DAG_threaded_update_begin(Scene *scene,
}
}
- /* Add root node to the queue. */
- root_node = scene->theDag->DagNode.first;
- root_node->scheduled = true;
- func(root_node, user_data);
+ /* Add root nodes to the queue. */
+ BLI_spin_lock(&threaded_update_lock);
+ for (node = scene->theDag->DagNode.first; node; node = node->next) {
+ if (node->num_pending_parents == 0) {
+ node->scheduled = true;
+ func(node, user_data);
+ }
+ }
+ BLI_spin_unlock(&threaded_update_lock);
}
/* This function is called when handling node is done.