diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-07 13:47:00 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-07 13:48:29 +0300 |
commit | b3a7a75a266de6765d8c04953c0dabce3c30c359 (patch) | |
tree | 98d27c5eb1d6573235c42e6e4b14137a8cee5c49 /source/blender/editors/armature/pose_transform.c | |
parent | 16017178b24c9c84df5c1114fae8dce4796c6c26 (diff) |
Cleanup: remove moar G.main usages.
Notes:
* Really need to address RNA setters case, end up adding way too much
G.main here these days... :/
* Added Main pointer into bAnimContext, helps a lot in anim code ;)
Diffstat (limited to 'source/blender/editors/armature/pose_transform.c')
-rw-r--r-- | source/blender/editors/armature/pose_transform.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index c726b4db7bf..712001c55dd 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -70,12 +70,12 @@ /* Pose Apply */ /* helper for apply_armature_pose2bones - fixes parenting of objects that are bone-parented to armature */ -static void applyarmature_fix_boneparents(Scene *scene, Object *armob) +static void applyarmature_fix_boneparents(Main *bmain, Scene *scene, Object *armob) { Object workob, *ob; /* go through all objects in database */ - for (ob = G.main->object.first; ob; ob = ob->id.next) { + for (ob = bmain->object.first; ob; ob = ob->id.next) { /* if parent is bone in this armature, apply corrections */ if ((ob->parent == armob) && (ob->partype == PARBONE)) { /* apply current transform from parent (not yet destroyed), @@ -193,7 +193,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op) BKE_pose_where_is(scene, ob); /* fix parenting of objects which are bone-parented */ - applyarmature_fix_boneparents(scene, ob); + applyarmature_fix_boneparents(bmain, scene, ob); /* note, notifier might evolve */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); |