[Bf-blender-cvs] [9c509a72194] master: UI: Display indicator in the 3D Viewport when Clipping Region is on

Pablo Vazquez noreply at git.blender.org
Fri May 7 17:17:30 CEST 2021


Commit: 9c509a721949b7baae1a66b5775f44d52a5ef4c0
Author: Pablo Vazquez
Date:   Fri May 7 16:12:23 2021 +0200
Branches: master
https://developer.blender.org/rB9c509a721949b7baae1a66b5775f44d52a5ef4c0

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

===================================================================

M	source/blender/editors/space_view3d/view3d_draw.c

===================================================================

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;



More information about the Bf-blender-cvs mailing list