Depsgraph: Avoid unneeded relations update when canceling transform
This was originally done for T46320 in order to re-store depsgraph state after all the constraint modifications. However, it relations were updated if there's any IK chain the the pose, which is a bit too annoying.
This commit is contained in:
parent
5ae4487351
commit
df07303fbb
|
@ -820,6 +820,7 @@ static void pose_grab_with_ik_clear(Object *ob)
|
|||
bKinematicConstraint *data;
|
||||
bPoseChannel *pchan;
|
||||
bConstraint *con, *next;
|
||||
bool need_dependency_update = false;
|
||||
|
||||
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
|
||||
/* clear all temporary lock flags */
|
||||
|
@ -834,6 +835,7 @@ static void pose_grab_with_ik_clear(Object *ob)
|
|||
data = con->data;
|
||||
if (data->flag & CONSTRAINT_IK_TEMP) {
|
||||
/* iTaSC needs clear for removed constraints */
|
||||
need_dependency_update = true;
|
||||
BIK_clear_data(ob->pose);
|
||||
|
||||
BLI_remlink(&pchan->constraints, con);
|
||||
|
@ -849,10 +851,10 @@ static void pose_grab_with_ik_clear(Object *ob)
|
|||
}
|
||||
|
||||
#ifdef WITH_LEGACY_DEPSGRAPH
|
||||
if (!DEG_depsgraph_use_legacy())
|
||||
if (!DEG_depsgraph_use_legacy() && need_dependency_update)
|
||||
#endif
|
||||
{
|
||||
/* TODO(sergey): Consuder doing partial update only. */
|
||||
/* TODO(sergey): Consider doing partial update only. */
|
||||
DAG_relations_tag_update(G.main);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue