[Bf-extensions-cvs] [3cee0d9a] master: sun_position: fix HDRI mirrorball with rotated env texture
Damien Picard
noreply at git.blender.org
Fri Sep 20 11:43:38 CEST 2019
Commit: 3cee0d9a21c593750a7a67c5bf51924b6d07f6ca
Author: Damien Picard
Date: Thu Sep 19 12:53:51 2019 +0200
Branches: master
https://developer.blender.org/rBAC3cee0d9a21c593750a7a67c5bf51924b6d07f6ca
sun_position: fix HDRI mirrorball with rotated env texture
===================================================================
M sun_position/hdr.py
===================================================================
diff --git a/sun_position/hdr.py b/sun_position/hdr.py
index 4c1642ac..ceff0411 100644
--- a/sun_position/hdr.py
+++ b/sun_position/hdr.py
@@ -184,7 +184,7 @@ class SUNPOS_OT_ShowHdr(bpy.types.Operator):
# Convert vector to euler
el = asin(dir.z)
- az = atan2(dir.x, dir.y)
+ az = atan2(dir.x, dir.y) + env_tex.texture_mapping.rotation.z
sun_props.hdr_elevation = el
sun_props.hdr_azimuth = az
More information about the Bf-extensions-cvs
mailing list