[Bf-extensions-cvs] [af03b63e] master: Sun position: add new Sky Texture elevation and rotation properties
Damien Picard
noreply at git.blender.org
Fri Jun 26 11:13:43 CEST 2020
Commit: af03b63e256a3f656537e56b876cd6ade9b3ff16
Author: Damien Picard
Date: Wed Jun 24 17:55:23 2020 +0200
Branches: master
https://developer.blender.org/rBAaf03b63e256a3f656537e56b876cd6ade9b3ff16
Sun position: add new Sky Texture elevation and rotation properties
For the new Nishita sun model: see D7896
===================================================================
M sun_position/sun_calc.py
===================================================================
diff --git a/sun_position/sun_calc.py b/sun_position/sun_calc.py
index 8d56853d..26161888 100644
--- a/sun_position/sun_calc.py
+++ b/sun_position/sun_calc.py
@@ -161,6 +161,8 @@ def move_sun(context):
locZ = math.cos(sun.theta)
sky_node.texture_mapping.rotation.z = 0.0
sky_node.sun_direction = locX, locY, locZ
+ sky_node.sun_elevation = math.radians(sun.elevation)
+ sky_node.sun_rotation = math.radians(sun.az_north)
# Sun object
if (sun_props.sun_object is not None
More information about the Bf-extensions-cvs
mailing list