[Bf-blender-cvs] [45d76c1] multiview: From review: add tooltips to convergence_mode And add unique tooltip for viewport_distance
Dalai Felinto
noreply at git.blender.org
Tue Mar 17 18:17:21 CET 2015
Commit: 45d76c110ffd50c4fc91cca40818c1a8ade414cb
Author: Dalai Felinto
Date: Tue Mar 17 17:51:58 2015 +0100
Branches: multiview
https://developer.blender.org/rB45d76c110ffd50c4fc91cca40818c1a8ade414cb
>From review: add tooltips to convergence_mode
And add unique tooltip for viewport_distance
===================================================================
M release/scripts/startup/bl_ui/properties_data_camera.py
M source/blender/makesrna/intern/rna_camera.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index 67e9e56..6c45c2c 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -157,7 +157,7 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel):
row.prop(st, "interocular_distance")
if st.convergence_mode == 'PARALLEL':
- row.prop(st, "convergence_distance", text="Viewport Convergence")
+ row.prop(st, "viewport_convergence")
else:
row.prop(st, "convergence_distance")
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 6a12562..b63e2f9 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -95,9 +95,9 @@ static void rna_def_camera_stereo_data(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem convergence_mode_items[] = {
- {CAM_S3D_OFFAXIS, "OFFAXIS", 0, "Off-Axis", ""},
- {CAM_S3D_PARALLEL, "PARALLEL", 0, "Parallel", ""},
- {CAM_S3D_TOE, "TOE", 0, "Toe-in", ""},
+ {CAM_S3D_OFFAXIS, "OFFAXIS", 0, "Off-Axis", "Off-axis frustrums converging in a plane"},
+ {CAM_S3D_PARALLEL, "PARALLEL", 0, "Parallel", "Parallel cameras with no convergence"},
+ {CAM_S3D_TOE, "TOE", 0, "Toe-in", "Rotated cameras, looking at the convergence distance"},
{0, NULL, 0, NULL, NULL}
};
@@ -134,6 +134,13 @@ static void rna_def_camera_stereo_data(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.0f, 15.f, 1, 2);
RNA_def_property_ui_text(prop, "Convergence Plane Distance", "The converge point for the stereo cameras (often the distance between a projector and the projection screen)");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+
+ prop = RNA_def_property(srna, "viewport_convergence", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_float_sdna(prop, NULL, "convergence_distance");
+ RNA_def_property_range(prop, 0.00001f, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.0f, 15.f, 1, 2);
+ RNA_def_property_ui_text(prop, "Viewport Convergence", "Preview convergence distance for the stereo effect in the viewport. It doesn't affect the render!");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
}
void RNA_def_camera(BlenderRNA *brna)
More information about the Bf-blender-cvs
mailing list