From 48e871ab1d57ef2e95047b2be5718cee5d3cefe6 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 6 Jun 2018 15:50:24 +0200 Subject: Cleanup: Nuke moar G.main usages... --- source/blender/editors/armature/pose_transform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/armature/pose_transform.c') diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 1fc623eb6af..c726b4db7bf 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -92,6 +92,7 @@ static void applyarmature_fix_boneparents(Scene *scene, Object *armob) /* set the current pose as the restpose */ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object bArmature *arm = BKE_armature_from_object(ob); @@ -185,7 +186,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op) } /* convert editbones back to bones, and then free the edit-data */ - ED_armature_from_edit(arm); + ED_armature_from_edit(bmain, arm); ED_armature_edit_free(arm); /* flush positions of posebones */ -- cgit v1.2.3