diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-13 12:35:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-13 12:55:12 +0300 |
commit | c8597a465f22e020b1c0ce6fcfbb7b7308efdad1 (patch) | |
tree | bdff87671b2f24ce7f393534e4325fb9e66eeda8 /source/blender/editors/gpencil | |
parent | 754d3a2fe626fbe57bb6ef47581368e3859f6390 (diff) |
Object Mode: remove Scene.obedit
Add ED_screen_window_find, BKE_workspace_edit_object
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_convert.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index d2ae8bc3ce7..8d45c6af686 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -55,6 +55,7 @@ #include "DNA_space_types.h" #include "DNA_view3d_types.h" #include "DNA_gpencil_types.h" +#include "DNA_workspace_types.h" #include "BKE_collection.h" #include "BKE_context.h" @@ -1293,6 +1294,7 @@ static int gp_convert_poll(bContext *C) bGPDframe *gpf = NULL; ScrArea *sa = CTX_wm_area(C); Scene *scene = CTX_data_scene(C); + const WorkSpace *workspace = CTX_wm_workspace(C); /* only if the current view is 3D View, if there's valid data (i.e. at least one stroke!), * and if we are not in edit mode! @@ -1301,7 +1303,7 @@ static int gp_convert_poll(bContext *C) (gpl = BKE_gpencil_layer_getactive(gpd)) && (gpf = BKE_gpencil_layer_getframe(gpl, CFRA, 0)) && (gpf->strokes.first) && - (scene->obedit == NULL)); + ((workspace->object_mode & OB_MODE_EDIT) == 0)); } static int gp_convert_layer_exec(bContext *C, wmOperator *op) |