forked from bartvdbraak/blender
Bugfix #3431
Too strict checking in depsgraph code missed a dependency case; this specifically when objects have own motion (ipo) and are being deformed by a parent. This worked, unless the parent also had own motion (ipo or constraint)... Also: the DAG_add_relation() added multiple relationships for object pairs, now they "Or" the relationship description flag. Makes it a tad faster again :)
This commit is contained in:
parent
d3bb02013f
commit
fb352bd8da
@ -662,11 +662,10 @@ void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel
|
|||||||
|
|
||||||
while (itA) { /* search if relation exist already */
|
while (itA) { /* search if relation exist already */
|
||||||
if (itA->node == fob2) {
|
if (itA->node == fob2) {
|
||||||
if (itA->type == rel) {
|
itA->type |= rel;
|
||||||
itA->count += 1;
|
itA->count += 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
itA = itA->next;
|
itA = itA->next;
|
||||||
}
|
}
|
||||||
/* create new relation and insert at head */
|
/* create new relation and insert at head */
|
||||||
@ -1395,9 +1394,9 @@ static void flush_update_node(DagNode *node, unsigned int layer, int curtime)
|
|||||||
ob->recalc &= ~OB_RECALC;
|
ob->recalc &= ~OB_RECALC;
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
/* Object has not RECALC flag */
|
|
||||||
/* check case where child changes and parent forcing obdata to change */
|
/* check case where child changes and parent forcing obdata to change */
|
||||||
|
/* should be done regardless if this ob has recalc set */
|
||||||
/* could merge this in with loop above...? (ton) */
|
/* could merge this in with loop above...? (ton) */
|
||||||
for(itA = node->child; itA; itA= itA->next) {
|
for(itA = node->child; itA; itA= itA->next) {
|
||||||
/* the relationship is visible */
|
/* the relationship is visible */
|
||||||
@ -1415,7 +1414,6 @@ static void flush_update_node(DagNode *node, unsigned int layer, int curtime)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* we only go deeper if node not checked or something changed */
|
/* we only go deeper if node not checked or something changed */
|
||||||
for(itA = node->child; itA; itA= itA->next) {
|
for(itA = node->child; itA; itA= itA->next) {
|
||||||
|
Loading…
Reference in New Issue
Block a user