diff options
Diffstat (limited to 'source/blender/editors/armature/pose_lib.c')
-rw-r--r-- | source/blender/editors/armature/pose_lib.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 25f1b282f14..f11168525c0 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -46,7 +46,6 @@ #include "BKE_animsys.h" #include "BKE_action.h" #include "BKE_armature.h" -#include "BKE_depsgraph.h" #include "BKE_global.h" #include "BKE_idprop.h" #include "BKE_library.h" @@ -55,6 +54,8 @@ #include "BKE_context.h" #include "BKE_report.h" +#include "DEG_depsgraph.h" + #include "RNA_access.h" #include "RNA_define.h" #include "RNA_enum_types.h" @@ -1068,6 +1069,9 @@ static void poselib_keytag_pose(bContext *C, Scene *scene, tPoseLib_PreviewData static void poselib_preview_apply(bContext *C, wmOperator *op) { tPoseLib_PreviewData *pld = (tPoseLib_PreviewData *)op->customdata; + EvaluationContext eval_ctx; + + CTX_data_eval_ctx(C, &eval_ctx); /* only recalc pose (and its dependencies) if pose has changed */ if (pld->redraw == PL_PREVIEW_REDRAWALL) { @@ -1090,9 +1094,9 @@ static void poselib_preview_apply(bContext *C, wmOperator *op) */ // FIXME: shouldn't this use the builtin stuff? if ((pld->arm->flag & ARM_DELAYDEFORM) == 0) - DAG_id_tag_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DEG_id_tag_update(&pld->ob->id, OB_RECALC_DATA); /* sets recalc flags */ else - BKE_pose_where_is(pld->scene, pld->ob); + BKE_pose_where_is(&eval_ctx, pld->scene, pld->ob); } /* do header print - if interactively previewing */ @@ -1583,6 +1587,9 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op) bArmature *arm = pld->arm; bAction *act = pld->act; TimeMarker *marker = pld->marker; + EvaluationContext eval_ctx; + + CTX_data_eval_ctx(C, &eval_ctx); /* redraw the header so that it doesn't show any of our stuff anymore */ ED_area_headerprint(pld->sa, NULL); @@ -1598,9 +1605,9 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op) * - note: code copied from transform_generics.c -> recalcData() */ if ((arm->flag & ARM_DELAYDEFORM) == 0) - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */ else - BKE_pose_where_is(scene, ob); + BKE_pose_where_is(&eval_ctx, scene, ob); } else if (pld->state == PL_PREVIEW_CONFIRM) { /* tag poses as appropriate */ @@ -1611,14 +1618,14 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op) action_set_activemarker(act, marker, NULL); /* Update event for pose and deformation children */ - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* updates */ if (IS_AUTOKEY_MODE(scene, NORMAL)) { //remake_action_ipos(ob->action); } else - BKE_pose_where_is(scene, ob); + BKE_pose_where_is(&eval_ctx, scene, ob); } /* Request final redraw of the view. */ |