Commit: 60ecc6b3b38ccedd282da7c635578504a11707b4
Author: Dalai Felinto
Date:   Wed Apr 8 03:10:39 2015 -0300
Branches: master
https://developer.blender.org/rB60ecc6b3b38ccedd282da7c635578504a11707b4

Multiview: Expose current drawn eye to API (viewport only)

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

M       source/blender/makesrna/intern/rna_space.c

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

diff --git a/source/blender/makesrna/intern/rna_space.c 
b/source/blender/makesrna/intern/rna_space.c
index 8e573e0..0419802 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -118,6 +118,11 @@ static EnumPropertyItem multiview_camera_items[] = {
 #undef V3D_S3D_CAMERA_S3D
 #undef V3D_S3D_CAMERA_VIEWS
 
+static EnumPropertyItem stereo3d_eye_items[] = {
+    {STEREO_LEFT_ID, "LEFT_EYE", ICON_NONE, "Left Eye"},
+    {STEREO_RIGHT_ID, "RIGHT_EYE", ICON_NONE, "Right Eye"},
+    {0, NULL, 0, NULL, NULL}
+};
 
 static EnumPropertyItem pivot_items_full[] = {
        {V3D_CENTER, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center",
@@ -2563,6 +2568,13 @@ static void rna_def_space_view3d(BlenderRNA *brna)
        RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
 
        /* Stereo Settings */
+       prop = RNA_def_property(srna, "stereo_3d_eye", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "multiview_eye");
+       RNA_def_property_enum_items(prop, stereo3d_eye_items);
+       RNA_def_property_enum_funcs(prop, NULL, NULL, 
"rna_SpaceView3D_stereo3d_camera_itemf");
+       RNA_def_property_ui_text(prop, "Stereo Eye", "Current stereo eye being 
drawn");
+       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
        prop = RNA_def_property(srna, "stereo_3d_camera", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "stereo3d_camera");
        RNA_def_property_enum_items(prop, stereo3d_camera_items);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to