diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-08 13:16:37 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-08 13:17:22 +0300 |
commit | 7b6af843c2bdef9c9ab6d00100d93192a8e769c0 (patch) | |
tree | 1dae0407c639733739a2e281547f54d8e8a93614 /source/blender/editors/gpencil/gpencil_edit.c | |
parent | 55606dbdbcd33fb8ba2ee41284fc1c5c35977815 (diff) |
Cleanup: getting rid of G.main.
Sometimes one needs a *lot* of changes for a single G.main... :/
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index d48efd75746..cdd8d571400 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -57,6 +57,7 @@ #include "BKE_context.h" #include "BKE_gpencil.h" #include "BKE_library.h" +#include "BKE_main.h" #include "BKE_report.h" #include "BKE_screen.h" @@ -2098,6 +2099,7 @@ static int gp_strokes_reproject_poll(bContext *C) static int gp_strokes_reproject_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); GP_SpaceConversion gsc = {NULL}; eGP_ReprojectModes mode = RNA_boolean_get(op->ptr, "type"); @@ -2108,7 +2110,7 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op) /* init autodist for geometry projection */ if (mode == GP_REPROJECT_SURFACE) { view3d_region_operator_needs_opengl(CTX_wm_window(C), gsc.ar); - ED_view3d_autodist_init(scene, gsc.ar, CTX_wm_view3d(C), 0); + ED_view3d_autodist_init(bmain, scene, gsc.ar, CTX_wm_view3d(C), 0); } // TODO: For deforming geometry workflow, create new frames? |