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>2015-11-12 18:19:30 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-11-12 18:19:30 +0300
commit03e8202b7b1963bc856ca31b205364ddc569535a (patch)
tree6fb9531e89ca5070b77d3aa60a7e5e0d8f202e6e /source/blender/editors/transform/transform_conversions.c
parent8ef68bf989cee6084be00ec460bf555c4eecbcd7 (diff)
Fix T46320: New Depsgraph: Auto-IK doesn't work
The issue is caused by transform tool temporary affecting on the pose constraints, which actually changes the way how pose is to be evaluated. This isn't ideal patch from the performance point of view, but only limited to the new depsgraph, so we've got some time to work on partial graph updates.
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r--source/blender/editors/transform/transform_conversions.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 5898ad6cadf..5ba11c91bae 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -117,6 +117,8 @@
#include "RNA_access.h"
+#include "DEG_depsgraph.h"
+
#include "transform.h"
#include "bmesh.h"
@@ -845,6 +847,14 @@ static void pose_grab_with_ik_clear(Object *ob)
}
}
}
+
+#ifdef WITH_LEGACY_DEPSGRAPH
+ if (!DEG_depsgraph_use_legacy())
+#endif
+ {
+ /* TODO(sergey): Consuder doing partial update only. */
+ DAG_relations_tag_update(G.main);
+ }
}
/* adds the IK to pchan - returns if added */
@@ -995,8 +1005,16 @@ static short pose_grab_with_ik(Object *ob)
}
/* iTaSC needs clear for new IK constraints */
- if (tot_ik)
+ if (tot_ik) {
BIK_clear_data(ob->pose);
+#ifdef WITH_LEGACY_DEPSGRAPH
+ if (!DEG_depsgraph_use_legacy())
+#endif
+ {
+ /* TODO(sergey): Consuder doing partial update only. */
+ DAG_relations_tag_update(G.main);
+ }
+ }
return (tot_ik) ? 1 : 0;
}