Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kim <pk15950@gmail.com>2022-04-30 10:23:43 +0300
committerPeter Kim <pk15950@gmail.com>2022-04-30 10:23:43 +0300
commit5c92c04518b5dc7c57c3b3a9e81b45879af2e080 (patch)
tree7c4f0dee8132ae57fc896989f8e7d5839460c9d1 /source/blender/editors/space_view3d
parent2fc6563a597ad8877fea5e580c87eb4e13e58961 (diff)
XR: Add object extras, object types visibility session options
This allows object extras such as image-empties to be shown in the VR viewport/headset display. Being able to see reference images in VR can be useful for architectural walkthroughs and 3D modeling applications. Since users may not want to see all object extras (lights, cameras, etc.), per-object-type visibility settings are also added as session options. By slightly refactoring the definition of the 3D View object types visibility panel (note: no functional changes), the VR Scene Inspection add-on can show a similar panel without duplicating code. When VR selection is possible in the future, the object type select options can also be enabled. Reviewed By: Severin Differential Revision: https://developer.blender.org/D14220
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 5a27349dc7f..5b068750d76 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1723,6 +1723,8 @@ void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph,
Scene *scene,
View3DShading *shading_override,
eDrawType drawtype,
+ int object_type_exclude_viewport_override,
+ int object_type_exclude_select_override,
int winx,
int winy,
uint draw_flags,
@@ -1785,7 +1787,10 @@ void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph,
/* Disable other overlays (set all available _HIDE_ flags). */
v3d.overlay.flag |= V3D_OVERLAY_HIDE_CURSOR | V3D_OVERLAY_HIDE_TEXT |
V3D_OVERLAY_HIDE_MOTION_PATHS | V3D_OVERLAY_HIDE_BONES |
- V3D_OVERLAY_HIDE_OBJECT_XTRAS | V3D_OVERLAY_HIDE_OBJECT_ORIGINS;
+ V3D_OVERLAY_HIDE_OBJECT_ORIGINS;
+ if ((draw_flags & V3D_OFSDRAW_SHOW_OBJECT_EXTRAS) == 0) {
+ v3d.overlay.flag |= V3D_OVERLAY_HIDE_OBJECT_XTRAS;
+ }
v3d.flag |= V3D_HIDE_HELPLINES;
}
@@ -1793,6 +1798,9 @@ void ED_view3d_draw_offscreen_simple(Depsgraph *depsgraph,
v3d.flag |= V3D_XR_SESSION_SURFACE;
}
+ v3d.object_type_exclude_viewport = object_type_exclude_viewport_override;
+ v3d.object_type_exclude_select = object_type_exclude_select_override;
+
rv3d.persp = RV3D_PERSP;
v3d.clip_start = clip_start;
v3d.clip_end = clip_end;