diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-12 11:13:36 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-12 14:06:36 +0300 |
commit | 87fd1666542adf1507d78bf96574fd56a8be3af8 (patch) | |
tree | feabc4af67e4edd813f1f68b4eace8ae7e968e2f /source/blender/blenloader | |
parent | dbbe721c2afda4a3b5c8ea7e60cf3f2b011cc857 (diff) |
Depsgraph: Add utility function to tag pose for recalc
Currently this function only tags pose itself, totally matching previous
behavior. But this will be needed in the future once new dependency graph
is landed, because of it's granular nature which relies on the fact that
pose channels are all up to date when building the graph.
Should be no functional changes so far.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 3 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_legacy.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a4dd2264816..6634767d412 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -111,6 +111,7 @@ #include "BLF_translation.h" +#include "BKE_action.h" #include "BKE_armature.h" #include "BKE_brush.h" #include "BKE_cloth.h" @@ -3009,7 +3010,7 @@ static void lib_link_pose(FileData *fd, Main *bmain, Object *ob, bPose *pose) if (rebuild) { DAG_id_tag_update_ex(bmain, &ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); - pose->flag |= POSE_RECALC; + BKE_pose_tag_recalc(bmain, pose); } } diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 94ad348bfcf..dab22d414d8 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -77,6 +77,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" +#include "BKE_action.h" #include "BKE_armature.h" #include "BKE_colortools.h" #include "BKE_constraint.h" @@ -1950,7 +1951,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) /* btw. armature_rebuild_pose is further only called on leave editmode */ if (ob->type == OB_ARMATURE) { if (ob->pose) - ob->pose->flag |= POSE_RECALC; + BKE_pose_tag_recalc(main, ob->pose); /* cannot call stuff now (pointers!), done in setup_app_data */ ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME; @@ -2074,7 +2075,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) data->rootbone = -1; /* update_pose_etc handles rootbone == -1 */ - ob->pose->flag |= POSE_RECALC; + BKE_pose_tag_recalc(main, ob->pose); } } } |