diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-07 03:26:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-07 03:41:33 +0300 |
commit | a3d647558e2234ee3c7acb338ed51e432d9ca92a (patch) | |
tree | 9497169f3928831827c96a32bce86585256ab6cb /source/blender/draw | |
parent | e1a62fa1a61167990c4ade74b9e8b56573e18d2d (diff) |
DRW: show image empty frame when the 'side' is hidden
This behavior matches back-face culled mesh objects,
where the wire outline doesn't depend on the viewing angle.
Applying this before empty visibility check for view framing,
since it's strange if viewing all gives different results
depending on back-face culling.
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 126e5da4b83..f68be196f0e 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -919,7 +919,7 @@ static void DRW_shgroup_empty_image( { /* TODO: 'StereoViews', see draw_empty_image. */ - if (!BKE_object_empty_image_is_visible_in_view3d(ob, rv3d)) { + if (!BKE_object_empty_image_frame_is_visible_in_view3d(ob, rv3d)) { return; } @@ -945,7 +945,7 @@ static void DRW_shgroup_empty_image( /* OPTI(fclem) We need sorting only for transparent images. If an image as no alpha channel and * ob->col[3] == 1.0f, we could remove it from the sorting pass. */ - if (tex && (ob->color[3] > 0.0f)) { + if (tex && (ob->color[3] > 0.0f) && BKE_object_empty_image_data_is_visible_in_view3d(ob, rv3d)) { DRWShadingGroup *grp = DRW_shgroup_create(sh_data->object_empty_image, sgl->image_empties); DRW_shgroup_uniform_texture(grp, "image", tex); /* TODO(fclem) implement DRW_shgroup_uniform_vec2_copy */ |