Commit: bf908e20ae95ac3e1fef9afd18bf27b4a57d826c
Author: makowalski
Date:   Tue Jul 27 20:39:07 2021 -0400
Branches: usd-importer-T81257-merge
https://developer.blender.org/rBbf908e20ae95ac3e1fef9afd18bf27b4a57d826c

USD import: convert sun angle to radians

Now converting USD distant light angle from degrees
to radians.

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

M       source/blender/io/usd/intern/usd_reader_light.cc

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

diff --git a/source/blender/io/usd/intern/usd_reader_light.cc 
b/source/blender/io/usd/intern/usd_reader_light.cc
index f62576fcc81..aa4059f7200 100644
--- a/source/blender/io/usd/intern/usd_reader_light.cc
+++ b/source/blender/io/usd/intern/usd_reader_light.cc
@@ -236,7 +236,7 @@ void USDLightReader::read_object_data(Main *bmain, const 
double motionSampleTime
         if (pxr::UsdAttribute angle_attr = distant_light.GetAngleAttr()) {
           float angle = 0.0f;
           if (angle_attr.Get(&angle, motionSampleTime)) {
-            blight->sun_angle = angle;
+            blight->sun_angle = angle * (float)M_PI / 180.0f;
           }
         }
       }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to