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>2016-05-09 17:03:07 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-05-09 17:04:26 +0300
commitdf07303fbbe891a52beff1e2a816404dbf48d49e (patch)
tree6ac6abcc5b8014ff1e4c08bdee3a6baddb80df7d /source/blender/editors/transform
parent5ae448735123f149c391d8245d33190669a21a94 (diff)
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.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform_conversions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 17f23e9fe21..fa5e86813fa 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -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);
}
}