Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonique Dewanchand <mdewanchand>2022-09-01 11:00:53 +0300
committerMonique <mdewanchand@atmind.nl>2022-09-01 11:22:43 +0300
commit17501c146edc4af8a5e04565dc4d0b30ed5c5323 (patch)
tree73fe3334ff45b67d45fa1b5a5ae7ff06ec990a5a /source/blender/editors/space_image
parentf9c249917dbf9c450abf52df1f60b3d587bc106a (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/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_edit.c3
-rw-r--r--source/blender/editors/space_image/space_image.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c
index 0de50474ab8..d17602ecd05 100644
--- a/source/blender/editors/space_image/image_edit.c
+++ b/source/blender/editors/space_image/image_edit.c
@@ -18,6 +18,7 @@
#include "BKE_editmesh.h"
#include "BKE_global.h"
#include "BKE_image.h"
+#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_scene.h"
@@ -471,7 +472,7 @@ bool ED_space_image_maskedit_poll(bContext *C)
if (sima) {
ViewLayer *view_layer = CTX_data_view_layer(C);
- Object *obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
+ Object *obedit = BKE_view_layer_edit_object_get(view_layer);
return ED_space_image_check_show_maskedit(sima, obedit);
}
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 00493d939ca..67bff9677dc 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -20,6 +20,7 @@
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_image.h"
+#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_lib_remap.h"
#include "BKE_screen.h"
@@ -351,7 +352,7 @@ static void image_listener(const wmSpaceTypeListenerParams *params)
break;
case NC_MASK: {
ViewLayer *view_layer = WM_window_get_active_view_layer(win);
- Object *obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
+ Object *obedit = BKE_view_layer_edit_object_get(view_layer);
if (ED_space_image_check_show_maskedit(sima, obedit)) {
switch (wmn->data) {
case ND_SELECT:
@@ -393,7 +394,7 @@ static void image_listener(const wmSpaceTypeListenerParams *params)
case ND_TRANSFORM:
case ND_MODIFIER: {
ViewLayer *view_layer = WM_window_get_active_view_layer(win);
- Object *ob = OBACT(view_layer);
+ Object *ob = BKE_view_layer_active_object_get(view_layer);
if (ob && (ob == wmn->reference) && (ob->mode & OB_MODE_EDIT)) {
if (sima->lock && (sima->flag & SI_DRAWSHADOW)) {
ED_area_tag_refresh(area);