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:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-05-17 15:12:29 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-05-18 11:56:57 +0300
commitcbe7f9dd03634a29082f51d05a2b1b71c6fc6aef (patch)
treec078fa28ca7fd0484076e4d7bd0a61924ee7d248 /source/blender/makesrna/intern/rna_camera.c
parent7b356a856540a1affa5dc85360183418e6337a5a (diff)
Cycles: Pole merging for spherical stereo
The idea of pole merge is to fade interocular distance after a certain altitude to zero when altitude goes closer to a pole. This should prevent annoyances looking up in the sky or down to the bottom. Works for both panorama and perspective cameras when Spherical Stereo is enabled. Reviewers: dfelinto, brecht Reviewed By: brecht Subscribers: sebastian_k Differential Revision: https://developer.blender.org/D1998
Diffstat (limited to 'source/blender/makesrna/intern/rna_camera.c')
-rw-r--r--source/blender/makesrna/intern/rna_camera.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index fd81f3aa46c..dcb4d65f3f9 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -151,6 +151,24 @@ static void rna_def_camera_stereo_data(BlenderRNA *brna)
"Render every pixel rotating the camera around the "
"middle of the interocular distance");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+
+ prop = RNA_def_property(srna, "use_pole_merge", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_S3D_POLE_MERGE);
+ RNA_def_property_ui_text(prop, "Use Pole Merge",
+ "Fade interocular distance to 0 after the given cutoff angle");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+
+ prop = RNA_def_property(srna, "pole_merge_angle_from", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_range(prop, 0.0f, M_PI / 2.0f);
+ RNA_def_property_ui_text(prop, "Pole Merge Start Angle",
+ "Angle at which interocular distance starts to fade to 0");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+
+ prop = RNA_def_property(srna, "pole_merge_angle_to", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_range(prop, 0.0f, M_PI / 2.0f);
+ RNA_def_property_ui_text(prop, "Pole Merge End Angle",
+ "Angle at which interocular distance is 0");
+ RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
}
void RNA_def_camera(BlenderRNA *brna)