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/makesdna | |
parent | 754d3a2fe626fbe57bb6ef47581368e3859f6390 (diff) |
Object Mode: remove Scene.obedit
Add ED_screen_window_find, BKE_workspace_edit_object
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 4ed23f2dbe1..bf5f7c1d0da 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1944,9 +1944,14 @@ extern const char *RE_engine_id_CYCLES; #define BASACT(_view_layer) ((_view_layer)->basact) #define OBACT(_view_layer) (BASACT(_view_layer) ? BASACT(_view_layer)->object: NULL) +#define OBEDIT_FROM_WORKSPACE(workspace, _view_layer) \ + (((workspace)->object_mode & OD_MODE_EDIT) ? OBACT(_view_layer) : NULL) #define OBEDIT_FROM_EVAL_CTX(eval_ctx) \ (((eval_ctx)->object_mode & OB_MODE_EDIT) ? OBACT((eval_ctx)->view_layer) : NULL) +#define OBEDIT_FROM_WINDOW(window) \ + BKE_workspace_edit_object(WM_window_get_active_workspace(window), WM_window_get_active_scene(window)) + #define V3D_CAMERA_LOCAL(v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : NULL) #define V3D_CAMERA_SCENE(scene, v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : (scene)->camera) |