From 3f863ab4e12ab0d917db1b0a5c47dc0766d0f465 Mon Sep 17 00:00:00 2001 From: DavidBluecame Date: Sat, 9 May 2020 18:46:02 +0200 Subject: [PATCH] Angular camera: modified to add several types of angular projections and to fix new ortographic calculations --- CHANGELOG | 5 +++++ io/yaf_object.py | 2 +- prop/yaf_camera.py | 15 +++++++++++---- ui/properties_yaf_camera.py | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 249205ec..27298561 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,11 @@ This is an abbreviated list of changes. The full/detailed list of changes can be * Blender Exporter (for Blender v2.7x): https://github.com/YafaRay/Blender-Exporter/commits/master +YafaRay v3.4.4 (2020-05-09) for Blender 2.79: +--------------------------------------------- +* Angular camera: modified to add several types of angular projections and to fix new ortographic calculations. `[Blender Exporter + Core]` + + YafaRay v3.4.3 (2020-05-09) for Blender 2.79: --------------------------------------------- * Angular camera: added "Ortographic" projection. `[Blender Exporter + Core]` diff --git a/io/yaf_object.py b/io/yaf_object.py index caadf6cf..e9c5a011 100644 --- a/io/yaf_object.py +++ b/io/yaf_object.py @@ -163,8 +163,8 @@ def __init__ (self, camera, camera_name, view_name): elif camType == "angular": yi.paramsSetBool("circular", camera.circular) - yi.paramsSetBool("orthographic", camera.orthographic) yi.paramsSetBool("mirrored", camera.mirrored) + yi.paramsSetString("projection", camera.angular_projection) yi.paramsSetFloat("max_angle", camera.max_angle) yi.paramsSetFloat("angle", camera.angular_angle) diff --git a/prop/yaf_camera.py b/prop/yaf_camera.py index d44ecf91..fd73dc72 100644 --- a/prop/yaf_camera.py +++ b/prop/yaf_camera.py @@ -66,9 +66,16 @@ def register(): name="Circular", default=False) - Camera.orthographic = BoolProperty( - name="Orthographic projection", - default=False) + Camera.angular_projection = EnumProperty( + name="Angular projection", + items=( + ('equidistant', "Equidistant (default)", ""), + ('orthographic', "Orthographic (angle should be 90º or less)", ""), + ('stereographic', "Stereographic (angle should be less than 180º)", ""), + ('equisolid_angle', "Equisolid Angle", ""), + ('rectilinear', "Rectilinear (angle should be less than 90º)", ""), + ), + default='equidistant') Camera.use_clipping = BoolProperty( name="Use clipping", @@ -113,7 +120,7 @@ def unregister(): Camera.max_angle Camera.mirrored Camera.circular - Camera.orthographic + Camera.angular_projection Camera.use_clipping Camera.bokeh_type Camera.aperture diff --git a/ui/properties_yaf_camera.py b/ui/properties_yaf_camera.py index ba7f5b3a..01141fa7 100644 --- a/ui/properties_yaf_camera.py +++ b/ui/properties_yaf_camera.py @@ -41,7 +41,7 @@ def draw(self, context): layout.prop(camera, "max_angle") layout.prop(camera, "mirrored") layout.prop(camera, "circular") - layout.prop(camera, "orthographic") + layout.prop(camera, "angular_projection") elif camera.camera_type == 'orthographic': layout.prop(camera, "ortho_scale")