diff options
author | Vincent Blankfield <vvv> | 2020-04-15 19:49:32 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-04-15 19:49:32 +0300 |
commit | eb46b55e569fdb23d89cd779df6575adcc2fec2e (patch) | |
tree | 6f67abf56dc28b0e94963b59aa3e092005688dfb /source | |
parent | f250b1f5a007a85a646a809a29b706e814f4cf32 (diff) |
Fix T75613: "In Front" setting did not override image empty "Depth"
Differential Revision: https://developer.blender.org/D7418
Reviewers: campbellbarton, brecht
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_image.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_image.c b/source/blender/draw/engines/overlay/overlay_image.c index 45d218b4959..c67b3179fa2 100644 --- a/source/blender/draw/engines/overlay/overlay_image.c +++ b/source/blender/draw/engines/overlay/overlay_image.c @@ -395,16 +395,22 @@ void OVERLAY_image_empty_cache_populate(OVERLAY_Data *vedata, Object *ob) /* Use the actual depth if we are doing depth tests to determine the distance to the object */ char depth_mode = DRW_state_is_depth() ? OB_EMPTY_IMAGE_DEPTH_DEFAULT : ob->empty_image_depth; DRWPass *pass = NULL; - switch (depth_mode) { - case OB_EMPTY_IMAGE_DEPTH_DEFAULT: - pass = (use_alpha_blend) ? psl->image_empties_blend_ps : psl->image_empties_ps; - break; - case OB_EMPTY_IMAGE_DEPTH_BACK: - pass = psl->image_empties_back_ps; - break; - case OB_EMPTY_IMAGE_DEPTH_FRONT: - pass = psl->image_empties_front_ps; - break; + if ((ob->dtx & OB_DRAWXRAY) != 0) { + /* Object In Front overrides image empty depth mode. */ + pass = psl->image_empties_front_ps; + } + else { + switch (depth_mode) { + case OB_EMPTY_IMAGE_DEPTH_DEFAULT: + pass = (use_alpha_blend) ? psl->image_empties_blend_ps : psl->image_empties_ps; + break; + case OB_EMPTY_IMAGE_DEPTH_BACK: + pass = psl->image_empties_back_ps; + break; + case OB_EMPTY_IMAGE_DEPTH_FRONT: + pass = psl->image_empties_front_ps; + break; + } } if (show_frame) { |