Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Picard <dam.pic@free.fr>2020-06-24 18:55:23 +0300
committerDamien Picard <dam.pic@free.fr>2020-06-26 11:11:29 +0300
commitaf03b63e256a3f656537e56b876cd6ade9b3ff16 (patch)
tree44354540ed3c3cb6536840fbe6eb319588029317 /sun_position
parent202330ba821e3c2ae32ff176b5546248810e741c (diff)
Sun position: add new Sky Texture elevation and rotation properties
For the new Nishita sun model: see D7896
Diffstat (limited to 'sun_position')
-rw-r--r--sun_position/sun_calc.py2
1 files changed, 2 insertions, 0 deletions
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