Did I find the right examples for you? yes no

All Samples(11)  |  Call(8)  |  Derive(0)  |  Import(3)

src/b/l/blenderpython-HEAD/scripts/addons_extern/sun_position/map.py   blenderpython(Download)
import math
 
from . sun_calc import degToRad, format_hms
from . properties import Display, Sun
 
    if Sun.RiseSetOK and Map.lineWidth:
        color = (0.2, 0.6, 1.0, 0.9)
        angle = -(degToRad(Sun.Sunrise.azimuth) - math.pi / 2)
        bgl.glLineWidth(Map.lineWidth)
        draw_angled_line(color, angle, px, py)
 
        color = (0.86, 0.18, 0.18, 0.9)
        angle = -(degToRad(Sun.Sunset.azimuth) - math.pi / 2)
 
    if Map.textureless:
        phi = degToRad(Sun.AzNorth) * -1
    else:
        phi = degToRad(Sun.Azimuth) * -1

src/b/l/blenderpython-HEAD/scripts/addons_extern/sun_position/hdr.py   blenderpython(Download)
import math
 
from . sun_calc import degToRad, radToDeg, format_hms
from . properties import Display, Sun
 
                   envTex = nt.get(Sun.HDR_texture)
                   if projection == "MIRROR_BALL":
                       envTex.texture_mapping.rotation.z = degToRad(270.0)
                   else:
                       envTex.texture_mapping.rotation.z = degToRad(90.0)
    x = theHdr.width / 2.0
    if crossChange and not Hdr.lockCrosshair:
        Sun.SP.HDR_azimuth = degToRad(newAzimuth + 180)
    azimuth = ((radToDeg(Sun.SP.HDR_azimuth) - 180) * x / 180.0) + x
 

src/b/l/blenderpython-HEAD/scripts/addons_extern/sun_position/ui_sun.py   blenderpython(Download)
from . properties import *
from . operators import *
from . sun_calc import Degrees, format_lat_long, degToRad, \
                       format_time, format_hms, Move_sun
 
                    if Sun.Bind.azDiff == 0:
                        if envTex.texture_mapping.rotation.z == 0.0:
                            Sun.Bind.azDiff = degToRad(90.0)
            except:
                pass