diff options
author | Monique Dewanchand <mdewanchand> | 2022-09-14 22:30:20 +0300 |
---|---|---|
committer | Monique <mdewanchand@atmind.nl> | 2022-09-14 22:30:56 +0300 |
commit | 23276bcc37acc54f1e1814abdf482a432523c3a6 (patch) | |
tree | 8677bacc96fb953fb27625a6ae563aa1ae5e1769 /source/blender/editors/armature/pose_transform.c | |
parent | 1a4854898000661dd7cf57492a7a75cb60ea63ef (diff) |
Adding `const Scene*` parameter in many areas.
Related to {D15885} that requires scene parameter
to be added in many places. To speed up the review process
the adding of the scene parameter was added in a separate
patch.
Reviewed By: mont29
Maniphest Tasks: T73411
Differential Revision: https://developer.blender.org/D15930
Diffstat (limited to 'source/blender/editors/armature/pose_transform.c')
-rw-r--r-- | source/blender/editors/armature/pose_transform.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index cfc6b0b6b6e..4211dd78b88 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -491,13 +491,14 @@ void POSE_OT_armature_apply(wmOperatorType *ot) /* set the current pose as the restpose */ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) { + const Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); View3D *v3d = CTX_wm_view3d(C); /* Needed to ensure #bPoseChannel.pose_mat are up to date. */ CTX_data_ensure_evaluated_depsgraph(C); - FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob) { + FOREACH_OBJECT_IN_MODE_BEGIN (scene, view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob) { const bArmature *arm = ob->data; int chanbase_len = BLI_listbase_count(&ob->pose->chanbase); @@ -1168,7 +1169,7 @@ static int pose_clear_transform_generic_exec(bContext *C, /* only clear relevant transforms for selected bones */ ViewLayer *view_layer = CTX_data_view_layer(C); View3D *v3d = CTX_wm_view3d(C); - FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob_iter) { + FOREACH_OBJECT_IN_MODE_BEGIN (scene, view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob_iter) { /* XXX: UGLY HACK (for auto-key + clear transforms). */ Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob_iter); ListBase dsources = {NULL, NULL}; @@ -1347,7 +1348,7 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op) depsgraph, (float)scene->r.cfra); const bool only_select = RNA_boolean_get(op->ptr, "only_selected"); - FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob) { + FOREACH_OBJECT_IN_MODE_BEGIN (scene, view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob) { if ((ob->adt) && (ob->adt->action)) { /* XXX: this is just like this to avoid contaminating anything else; * just pose values should change, so this should be fine |