diff options
author | Pablo Vazquez <pablo@blender.org> | 2021-05-07 17:12:23 +0300 |
---|---|---|
committer | Pablo Vazquez <pablo@blender.org> | 2021-05-07 18:17:29 +0300 |
commit | 9c509a721949b7baae1a66b5775f44d52a5ef4c0 (patch) | |
tree | 6c5a5e95a72efbf23c6d13a658e8e610c9ddad92 /source/blender/editors/space_view3d/view3d_draw.c | |
parent | 8f04ddbbc62631db4802ded6c26366c400361335 (diff) |
UI: Display indicator in the 3D Viewport when Clipping Region is on
Small addition inspired by [this tweet](https://twitter.com/Vorundor/status/1390645286624763909) of a user in a situation I also saw myself in the past.
Showing "(Clipped)" next to the view name in the `Text Info` overlay fits well since it's a per-viewport setting.
{F10059921, size=full}
While on Local view:
{F10059925, size=full}
Multiple viewports:
{F10059946, size=full}
Reviewed By: Severin
Differential Revision: https://developer.blender.org/D11193
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index f3a279ee12b..1ef37ba4f9b 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1288,6 +1288,11 @@ static void draw_viewport_name(ARegion *region, View3D *v3d, int xoffset, int *y name_array[name_array_len++] = IFACE_(" (Local)"); } + /* Indicate that clipping region is enabled. */ + if (rv3d->rflag & RV3D_CLIPPING) { + name_array[name_array_len++] = IFACE_(" (Clipped)"); + } + if (name_array_len > 1) { BLI_string_join_array(tmpstr, sizeof(tmpstr), name_array, name_array_len); name = tmpstr; |