diff options
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 8 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_view.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 7b46efd0566..96f7b2864ed 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -2942,7 +2942,7 @@ static void DRW_engines_enable_external(void) static void DRW_engines_enable(const Scene *scene, SceneLayer *sl) { - Object *obact = OBACT_NEW; + Object *obact = OBACT_NEW(sl); const int mode = CTX_data_mode_enum_ex(scene->obedit, obact); DRW_engines_enable_from_engine(scene); @@ -3134,7 +3134,7 @@ void DRW_draw_render_loop_ex( cache_is_dirty = GPU_viewport_cache_validate(DST.viewport, DRW_engines_get_hash()); DST.draw_ctx = (DRWContextState){ - ar, rv3d, v3d, scene, sl, OBACT_NEW, + ar, rv3d, v3d, scene, sl, OBACT_NEW(sl), /* reuse if caller sets */ DST.draw_ctx.evil_C, }; @@ -3318,7 +3318,7 @@ void DRW_draw_select_loop( /* Instead of 'DRW_context_state_init(C, &DST.draw_ctx)', assign from args */ DST.draw_ctx = (DRWContextState){ - ar, rv3d, v3d, scene, sl, OBACT_NEW, (bContext *)NULL, + ar, rv3d, v3d, scene, sl, OBACT_NEW(sl), (bContext *)NULL, }; DRW_viewport_var_init(); @@ -3414,7 +3414,7 @@ void DRW_draw_depth_loop( /* Instead of 'DRW_context_state_init(C, &DST.draw_ctx)', assign from args */ DST.draw_ctx = (DRWContextState){ - ar, rv3d, v3d, scene, sl, OBACT_NEW, (bContext *)NULL, + ar, rv3d, v3d, scene, sl, OBACT_NEW(sl), (bContext *)NULL, }; DRW_viewport_var_init(); diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c index 67bb781562e..ea1d93a6a85 100644 --- a/source/blender/draw/intern/draw_view.c +++ b/source/blender/draw/intern/draw_view.c @@ -613,7 +613,7 @@ void DRW_draw_background(void) static bool is_cursor_visible(Scene *scene, SceneLayer *sl) { - Object *ob = OBACT_NEW; + Object *ob = OBACT_NEW(sl); /* don't draw cursor in paint modes, but with a few exceptions */ if (ob && ob->mode & OB_MODE_ALL_PAINT) { diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 1e70e942d07..3f492b2f054 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1571,7 +1571,7 @@ static void DRW_shgroup_object_center(OBJECT_StorageList *stl, Object *ob, Scene const bool is_library = ob->id.us > 1 || ID_IS_LINKED_DATABLOCK(ob); DRWShadingGroup *shgroup; - if (ob == OBACT_NEW) { + if (ob == OBACT_NEW(sl)) { shgroup = stl->g_data->center_active; } else if (ob->base_flag & BASE_SELECTED) { |