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.
This commit is contained in:
Sergey Sharybin 2013-12-27 02:30:48 +06:00
parent feac8ee090
commit 79d8f1e4a5
Notes: blender-bot 2023-02-14 11:26:19 +01:00
Referenced by issue #37955, Freestyle render misalignment
1 changed files with 10 additions and 5 deletions

View File

@ -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.