1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # --------------------------------------------------------------------------
4 # The sun positioning algorithms are based on the National Oceanic
5 # and Atmospheric Administration's (NOAA) Solar Position Calculator
6 # which rely on calculations of Jean Meeus' book "Astronomical Algorithms."
7 # Use of NOAA data and products are in the public domain and may be used
8 # freely by the public as outlined in their policies at
9 # www.nws.noaa.gov/disclaimer.php
10 # --------------------------------------------------------------------------
11 # The geo parser script is by Maximilian Högner, released
12 # under the GNU GPL license:
13 # http://hoegners.de/Maxi/geo/
14 # --------------------------------------------------------------------------
19 "name": "Sun Position",
20 "author": "Michael Martin",
23 "location": "World > Sun Position",
24 "description": "Show sun position with objects and/or sky texture",
25 "doc_url": "{BLENDER_MANUAL_URL}/addons/lighting/sun_position.html",
26 "category": "Lighting",
31 importlib
.reload(properties
)
32 importlib
.reload(ui_sun
)
36 from . import properties
, ui_sun
, hdr
42 bpy
.utils
.register_class(properties
.SunPosProperties
)
43 bpy
.types
.Scene
.sun_pos_properties
= (
44 bpy
.props
.PointerProperty(type=properties
.SunPosProperties
,
46 description
="Sun Position Settings"))
47 bpy
.utils
.register_class(properties
.SunPosAddonPreferences
)
48 bpy
.utils
.register_class(ui_sun
.SUNPOS_OT_AddPreset
)
49 bpy
.utils
.register_class(ui_sun
.SUNPOS_MT_Presets
)
50 bpy
.utils
.register_class(ui_sun
.SUNPOS_PT_Panel
)
51 bpy
.utils
.register_class(ui_sun
.SUNPOS_PT_Location
)
52 bpy
.utils
.register_class(ui_sun
.SUNPOS_PT_Time
)
53 bpy
.utils
.register_class(hdr
.SUNPOS_OT_ShowHdr
)
55 bpy
.app
.handlers
.frame_change_post
.append(sun_calc
.sun_handler
)
59 bpy
.utils
.unregister_class(hdr
.SUNPOS_OT_ShowHdr
)
60 bpy
.utils
.unregister_class(ui_sun
.SUNPOS_PT_Panel
)
61 bpy
.utils
.unregister_class(ui_sun
.SUNPOS_PT_Location
)
62 bpy
.utils
.unregister_class(ui_sun
.SUNPOS_PT_Time
)
63 bpy
.utils
.unregister_class(ui_sun
.SUNPOS_MT_Presets
)
64 bpy
.utils
.unregister_class(ui_sun
.SUNPOS_OT_AddPreset
)
65 bpy
.utils
.unregister_class(properties
.SunPosAddonPreferences
)
66 del bpy
.types
.Scene
.sun_pos_properties
67 bpy
.utils
.unregister_class(properties
.SunPosProperties
)
69 bpy
.app
.handlers
.frame_change_post
.remove(sun_calc
.sun_handler
)