diff options
author | Hans Goudey <h.goudey@me.com> | 2021-11-09 22:08:36 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-11-09 22:08:36 +0300 |
commit | 4648c4990cd590dd0f4201cbccc2b5616856984e (patch) | |
tree | b13ddffd01a5ca0a27a740f9ef05348db193b6d6 /source/blender | |
parent | a356e4fb3fa35a6dd8fe0e5e395eb05686f1f90f (diff) | |
parent | 44239fa106335d2f620978a33a9e9b1ad2905caf (diff) |
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/intern/draw_common.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index 9151c0bd68b..2cbea2ae6d5 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -295,9 +295,10 @@ int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color { const DRWContextState *draw_ctx = DRW_context_state_get(); const bool is_edit = (draw_ctx->object_mode & OB_MODE_EDIT) && (ob->mode & OB_MODE_EDIT); - const bool active = (ob->base_flag & BASE_FROM_DUPLI) ? - (DRW_object_get_dupli_parent(ob) == view_layer->basact->object) : - (view_layer->basact && view_layer->basact->object == ob); + const bool active = view_layer->basact && + ((ob->base_flag & BASE_FROM_DUPLI) ? + (DRW_object_get_dupli_parent(ob) == view_layer->basact->object) : + (view_layer->basact->object == ob)); /* confusing logic here, there are 2 methods of setting the color * 'colortab[colindex]' and 'theme_id', colindex overrides theme_id. |