diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-12 18:19:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-11-12 18:19:30 +0300 |
commit | 03e8202b7b1963bc856ca31b205364ddc569535a (patch) | |
tree | 6fb9531e89ca5070b77d3aa60a7e5e0d8f202e6e /source/blender | |
parent | 8ef68bf989cee6084be00ec460bf555c4eecbcd7 (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')
-rw-r--r-- | source/blender/editors/transform/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/transform/SConscript | 1 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 20 |
3 files changed, 21 insertions, 1 deletions
diff --git a/source/blender/editors/transform/CMakeLists.txt b/source/blender/editors/transform/CMakeLists.txt index 42aa6a0a3a3..f3047c088a9 100644 --- a/source/blender/editors/transform/CMakeLists.txt +++ b/source/blender/editors/transform/CMakeLists.txt @@ -30,6 +30,7 @@ set(INC ../../makesdna ../../makesrna ../../windowmanager + ../../depsgraph ../../../../intern/guardedalloc ../../../../intern/glew-mx ) diff --git a/source/blender/editors/transform/SConscript b/source/blender/editors/transform/SConscript index 0f34ce546de..d35c2fc24ae 100644 --- a/source/blender/editors/transform/SConscript +++ b/source/blender/editors/transform/SConscript @@ -44,6 +44,7 @@ incs = [ '../../makesdna', '../../makesrna', '../../windowmanager', + '../../depsgraph', ] defs = [] 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; } |