diff options
author | Monique Dewanchand <mdewanchand> | 2022-09-01 11:00:53 +0300 |
---|---|---|
committer | Monique <mdewanchand@atmind.nl> | 2022-09-01 11:22:43 +0300 |
commit | 17501c146edc4af8a5e04565dc4d0b30ed5c5323 (patch) | |
tree | 73fe3334ff45b67d45fa1b5a5ae7ff06ec990a5a /source/blender/windowmanager | |
parent | f9c249917dbf9c450abf52df1f60b3d587bc106a (diff) |
Cleanup: Remove/replace View Layer macros.
This patch is a cleanup required before refactoring the view layer syncing
process {T73411}.
* Remove FIRSTBASE.
* Remove LASTBASE.
* Remove BASACT.
* Remove OBEDIT_FROM_WORKSPACE.
* Replace OBACT with BKE_view_layer_active_object.
* Replace OBEDIT_FROM_VIEW_LAYER with BKE_view_layer_edit_object.
Reviewed By: mont29
Maniphest Tasks: T73411
Differential Revision: https://developer.blender.org/D15799
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_toolsystem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c index 8b11eebf145..a3aaef6af31 100644 --- a/source/blender/windowmanager/intern/wm_toolsystem.c +++ b/source/blender/windowmanager/intern/wm_toolsystem.c @@ -26,6 +26,7 @@ #include "BKE_brush.h" #include "BKE_context.h" #include "BKE_idprop.h" +#include "BKE_layer.h" #include "BKE_lib_id.h" #include "BKE_main.h" #include "BKE_paint.h" @@ -367,7 +368,7 @@ void WM_toolsystem_ref_sync_from_context(Main *bmain, WorkSpace *workspace, bToo Scene *scene = WM_window_get_active_scene(win); ToolSettings *ts = scene->toolsettings; const ViewLayer *view_layer = WM_window_get_active_view_layer(win); - const Object *ob = OBACT(view_layer); + const Object *ob = BKE_view_layer_active_object_get(view_layer); if (ob == NULL) { /* pass */ } @@ -443,7 +444,7 @@ int WM_toolsystem_mode_from_spacetype(ViewLayer *view_layer, ScrArea *area, int switch (space_type) { case SPACE_VIEW3D: { /* 'area' may be NULL in this case. */ - Object *obact = OBACT(view_layer); + Object *obact = BKE_view_layer_active_object_get(view_layer); if (obact != NULL) { Object *obedit = OBEDIT_FROM_OBACT(obact); mode = CTX_data_mode_enum_ex(obedit, obact, obact->mode); |