diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-06 16:50:24 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-06 16:50:24 +0300 |
commit | 48e871ab1d57ef2e95047b2be5718cee5d3cefe6 (patch) | |
tree | 65088effec7dac68ea72fe2ae60e32df544d99a6 /source/blender/editors/armature/editarmature_retarget.c | |
parent | bfbd85e9d66be3793e51ef989f793bdd69214493 (diff) |
Cleanup: Nuke moar G.main usages...
Diffstat (limited to 'source/blender/editors/armature/editarmature_retarget.c')
-rw-r--r-- | source/blender/editors/armature/editarmature_retarget.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index ad0025955c2..b74b515b37f 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -40,6 +40,7 @@ #include "BKE_constraint.h" #include "BKE_armature.h" #include "BKE_context.h" +#include "BKE_main.h" #include "ED_armature.h" #include "ED_undo.h" @@ -2413,6 +2414,7 @@ static void finishRetarget(RigGraph *rigg) static void adjustGraphs(bContext *C, RigGraph *rigg) { + Main *bmain = CTX_data_main(C); bArmature *arm = rigg->ob->data; RigArc *arc; @@ -2426,13 +2428,14 @@ static void adjustGraphs(bContext *C, RigGraph *rigg) /* Turn the list into an armature */ arm->edbo = rigg->editbones; - ED_armature_from_edit(arm); + ED_armature_from_edit(bmain, arm); ED_undo_push(C, "Retarget Skeleton"); } static void retargetGraphs(bContext *C, RigGraph *rigg) { + Main *bmain = CTX_data_main(C); bArmature *arm = rigg->ob->data; ReebGraph *reebg = rigg->link_mesh; RigNode *inode; @@ -2453,7 +2456,7 @@ static void retargetGraphs(bContext *C, RigGraph *rigg) /* Turn the list into an armature */ arm->edbo = rigg->editbones; - ED_armature_from_edit(arm); + ED_armature_from_edit(bmain, arm); } const char *RIG_nameBone(RigGraph *rg, int arc_index, int bone_index) |