[Bf-blender-cvs] [79d8f1e] master: Fix T37955: Freestyle render misalignment
Sergey Sharybin
noreply at git.blender.org
Thu Dec 26 21:33:07 CET 2013
Commit: 79d8f1e4a5ca824b7c2d8f1f0106818c68cbbfa1
Author: Sergey Sharybin
Date: Fri Dec 27 02:30:48 2013 +0600
https://developer.blender.org/rB79d8f1e4a5ca824b7c2d8f1f0106818c68cbbfa1
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.
===================================================================
M source/blender/blenkernel/intern/depsgraph.c
===================================================================
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 8074d6b..6376878 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.
More information about the Bf-blender-cvs
mailing list