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_info
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_info')
-rw-r--r--source/blender/editors/space_info/info_stats.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_info/info_stats.cc b/source/blender/editors/space_info/info_stats.cc
index 450769d7225..0f872d0a02e 100644
--- a/source/blender/editors/space_info/info_stats.cc
+++ b/source/blender/editors/space_info/info_stats.cc
@@ -357,8 +357,8 @@ static void stats_update(Depsgraph *depsgraph,
View3D *v3d_local,
SceneStats *stats)
{
- const Object *ob = OBACT(view_layer);
- const Object *obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
+ const Object *ob = BKE_view_layer_active_object_get(view_layer);
+ const Object *obedit = BKE_view_layer_edit_object_get(view_layer);
memset(stats, 0x0, sizeof(*stats));
@@ -492,7 +492,7 @@ static bool format_stats(
static void get_stats_string(
char *info, int len, size_t *ofs, ViewLayer *view_layer, SceneStatsFmt *stats_fmt)
{
- Object *ob = OBACT(view_layer);
+ Object *ob = BKE_view_layer_active_object_get(view_layer);
Object *obedit = OBEDIT_FROM_OBACT(ob);
eObjectMode object_mode = ob ? (eObjectMode)ob->mode : OB_MODE_OBJECT;
LayerCollection *layer_collection = view_layer->active_collection;
@@ -684,7 +684,7 @@ void ED_info_draw_stats(
return;
}
- Object *ob = OBACT(view_layer);
+ Object *ob = BKE_view_layer_active_object_get(view_layer);
Object *obedit = OBEDIT_FROM_OBACT(ob);
eObjectMode object_mode = ob ? (eObjectMode)ob->mode : OB_MODE_OBJECT;
const int font_id = BLF_set_default();