[Bf-blender-cvs] [5099456] HMD_viewport: Move HMD panel into 3D View properties
Julian Eisel
noreply at git.blender.org
Thu Nov 17 23:07:52 CET 2016
Commit: 509945633b946ca04e76b6f3b0be26c066ec61fa
Author: Julian Eisel
Date: Thu Nov 17 23:06:30 2016 +0100
Branches: HMD_viewport
https://developer.blender.org/rB509945633b946ca04e76b6f3b0be26c066ec61fa
Move HMD panel into 3D View properties
Still not a really perfect place since this is global, but can't think of a better one. More options will be added later on, so worth having an own panel.
===================================================================
M release/scripts/startup/bl_ui/properties_render_layer.py
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_render_layer.py b/release/scripts/startup/bl_ui/properties_render_layer.py
index 16b7662..ecdf6fe 100644
--- a/release/scripts/startup/bl_ui/properties_render_layer.py
+++ b/release/scripts/startup/bl_ui/properties_render_layer.py
@@ -227,28 +227,5 @@ class RENDERLAYER_PT_views(RenderLayerButtonsPanel, Panel):
row.prop(rv, "camera_suffix", text="")
-class RENDERLAYER_PT_hmd(RenderLayerButtonsPanel, Panel):
- bl_label = "Head Mounted Displays"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
- bl_options = {'DEFAULT_CLOSED'}
-
- def draw(self, context):
- layout = self.layout
-
- scene = context.scene
- wm = context.window_manager
- session_running = wm.is_hmd_session_running;
-
- text_win = "Close HMD Window" if wm.has_hmd_window else "Open HMD Window"
- text_run = "Stop Session" if session_running else "Start Session"
- icon = 'PAUSE' if session_running else 'PLAY'
-
- row = layout.row(align=True)
- row.operator("wm.hmd_view_toggle", text=text_win)
- row.operator("wm.hmd_session_run", text=text_run, icon=icon)
-
- layout.prop(scene, "hmd_view_shade", text="Shading")
-
-
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 9de9376..653237f 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3358,6 +3358,29 @@ class VIEW3D_PT_view3d_shading(Panel):
subcol.prop(ssao_settings, "samples")
subcol.prop(ssao_settings, "color")
+class VIEW3D_PT_view3d_hmd_view(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'UI'
+ bl_label = "HMD View"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+
+ wm = context.window_manager
+ scene = context.scene
+
+ session_running = wm.is_hmd_session_running
+ text_win = "Close HMD Window" if wm.has_hmd_window else "Open HMD Window"
+ text_run = "Stop Session" if session_running else "Start Session"
+ icon_run = 'PAUSE' if session_running else 'PLAY'
+
+ row = layout.row(align=True)
+ row.operator("wm.hmd_view_toggle", text=text_win)
+ row.operator("wm.hmd_session_run", text=text_run, icon=icon_run)
+
+ layout.prop(scene, "hmd_view_shade", text="Shading")
+
class VIEW3D_PT_view3d_motion_tracking(Panel):
bl_space_type = 'VIEW_3D'
More information about the Bf-blender-cvs
mailing list