[Bf-blender-cvs] [aef5800] multiview: Multiview Base Commit 5/10: User Interface (renderlayers panel and preferences)

Dalai Felinto noreply at git.blender.org
Sat May 10 20:18:11 CEST 2014


Commit: aef5800b8c55328ea0442c94270f100b1642a1b2
Author: Dalai Felinto
Date:   Sat May 10 14:58:16 2014 -0300
https://developer.blender.org/rBaef5800b8c55328ea0442c94270f100b1642a1b2

Multiview Base Commit 5/10: User Interface (renderlayers panel and
preferences)

This is part of the multiview rebase from a github to git.blender.org
repository. The rebase was made based on file areas, so build is likely
broken in some of those parts, but it bulds fine in the end.

The documentation and sample files were removed and now live in:
https://github.com/dfelinto/multiview-samples

The original git history can be found in:
https://github.com/dfelinto/blender/tree/multiview-pre-b3d

Code contributors of the original branch in github:
* Alexey Akishin
* Gabriel Caraballo

Original design made in contribution with Francesco Siddi
Original branch and design partially reviewed by Brecht Van Lommel

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

M	release/scripts/startup/bl_ui/properties_render_layer.py
M	release/scripts/startup/bl_ui/space_userpref.py

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

diff --git a/release/scripts/startup/bl_ui/properties_render_layer.py b/release/scripts/startup/bl_ui/properties_render_layer.py
index 2494e49..52946cf 100644
--- a/release/scripts/startup/bl_ui/properties_render_layer.py
+++ b/release/scripts/startup/bl_ui/properties_render_layer.py
@@ -163,5 +163,64 @@ class RENDERLAYER_PT_layer_passes(RenderLayerButtonsPanel, Panel):
         self.draw_pass_type_buttons(col, rl, "refraction")
 
 
+class RENDERLAYER_UL_renderviews(UIList):
+    def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
+        # assert(isinstance(item, bpy.types.SceneRenderView)
+        view = item
+        if self.layout_type in {'DEFAULT', 'COMPACT'}:
+            layout.label(view.name, icon_value=icon + (not view.use))
+            layout.prop(view, "use", text="", index=index)
+        elif self.layout_type in {'GRID'}:
+            layout.alignment = 'CENTER'
+            layout.label("", icon_value=icon + (not view.use))
+
+
+class RENDERLAYER_PT_views(RenderLayerButtonsPanel, Panel):
+    bl_label     = "Views"
+    COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+    def draw_header(self, context):
+        rd = context.scene.render
+        self.layout.prop(rd, "use_multiple_views", text="")
+
+    def draw(self, context):
+        layout = self.layout
+
+        scene = context.scene
+        rd = scene.render
+        rv = rd.views.active
+
+
+        layout.active = rd.use_multiple_views
+        basic_stereo = rd.views_setup == 'SETUP_BASIC'
+
+        row = layout.row()
+        row.prop(rd, "views_setup", expand=True)
+
+        if basic_stereo:
+            row = layout.row()
+            row.template_list("RENDERLAYER_UL_renderviews", "", rd, "stereo_views", rd.views, "active_index", rows=2)
+
+            row = layout.row()
+            row.label(text="File Suffix:")
+            row.prop(rv, "file_suffix", text="")
+
+        else:
+            row = layout.row()
+            row.template_list("RENDERLAYER_UL_renderviews", "", rd, "views", rd.views, "active_index", rows=2)
+
+            col = row.column(align=True)
+            col.operator("scene.render_view_add", icon='ZOOMIN', text="")
+            col.operator("scene.render_view_remove", icon='ZOOMOUT', text="")
+
+            row = layout.row()
+            if rv and rv.name not in ('left', 'right'):
+                row.prop(rv, "name")
+
+            row = layout.row()
+            row.label(text="Camera Suffix:")
+            row.prop(rv, "camera_suffix", text="")
+
+
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 18f7c53..e64222e 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -406,6 +406,25 @@ class USERPREF_PT_system(Panel):
             sub.active = system.compute_device_type != 'CPU'
             sub.prop(system, "compute_device", text="")
 
+        col.separator()
+        col.separator()
+
+        col.label(text="3D Stereo Display:")
+        col.prop(system, "stereo_display", text="")
+
+        if system.stereo_display == 'ANAGLYPH':
+            col.prop(system, "stereo_anaglyph_type", text="Type")
+
+        if system.stereo_display == 'EPILEPSY':
+            col.prop(system, "stereo_epilepsy_interval")
+
+        if system.stereo_display == 'INTERLACE':
+            col.prop(system, "stereo_interlace_type", text="Type")
+            col.prop(system, "use_stereo_interlace_swap")
+
+        if system.stereo_display == 'SIDEBYSIDE':
+            col.prop(system, "use_stereo_sidebyside_crosseyed")
+
         # 2. Column
         column = split.column()
         colsplit = column.split(percentage=0.85)




More information about the Bf-blender-cvs mailing list