Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# --------------------------------------------------------------------------
# The sun positioning algorithms are based on the National Oceanic
# and Atmospheric Administration's (NOAA) Solar Position Calculator
# which rely on calculations of Jean Meeus' book "Astronomical Algorithms."
# Use of NOAA data and products are in the public domain and may be used
# freely by the public as outlined in their policies at
# www.nws.noaa.gov/disclaimer.php
# --------------------------------------------------------------------------
# The world map images have been composited from two NASA images.
# NASA's image use policy can be found at:
# http://www.nasa.gov/audience/formedia/features/MP_Photo_Guidelines.html
# --------------------------------------------------------------------------
# <pep8 compliant>
bl_info = {
"name": "Sun Position",
"author": "Michael Martin",
"version": (3, 0, 1),
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
"api": 53207,
"location": "World > Sun Position",
"description": "Show sun position with objects and/or sky texture",
"warning": "",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/3D_interaction/Sun_Position",
"tracker_url": "https://projects.blender.org/tracker/"
"index.php?func=detail&aid=29714",
"category": "Lighting"}
import bpy
from . properties import *
from . ui_sun import *
from . map import SunPos_Help
from . hdr import SunPos_HdrHelp
############################################################################
def register():
bpy.utils.register_class(SunPosSettings)
bpy.types.Scene.SunPos_property = (
bpy.props.PointerProperty(type=SunPosSettings,
name="Sun Position",
description="Sun Position Settings"))
bpy.utils.register_class(SunPosPreferences)
bpy.types.Scene.SunPos_pref_property = (
bpy.props.PointerProperty(type=SunPosPreferences,
name="Sun Position Preferences",
description="SP Preferences"))
bpy.utils.register_class(SunPos_OT_Controller)
bpy.utils.register_class(SunPos_OT_Preferences)
bpy.utils.register_class(SunPos_OT_PreferencesDone)
bpy.utils.register_class(SunPos_OT_DayRange)
bpy.utils.register_class(SunPos_OT_SetObjectGroup)
bpy.utils.register_class(SunPos_OT_ClearObjectGroup)
bpy.utils.register_class(SunPos_OT_TimePlace)
bpy.utils.register_class(SunPos_OT_Map)
bpy.utils.register_class(SunPos_OT_Hdr)
bpy.utils.register_class(SunPos_Panel)
bpy.utils.register_class(SunPos_OT_MapChoice)
bpy.utils.register_class(SunPos_Help)
bpy.utils.register_class(SunPos_HdrHelp)
def unregister():
bpy.utils.unregister_class(SunPos_HdrHelp)
bpy.utils.unregister_class(SunPos_Help)
bpy.utils.unregister_class(SunPos_OT_MapChoice)
bpy.utils.unregister_class(SunPos_Panel)
bpy.utils.unregister_class(SunPos_OT_Hdr)
bpy.utils.unregister_class(SunPos_OT_Map)
bpy.utils.unregister_class(SunPos_OT_TimePlace)
bpy.utils.unregister_class(SunPos_OT_ClearObjectGroup)
bpy.utils.unregister_class(SunPos_OT_SetObjectGroup)
bpy.utils.unregister_class(SunPos_OT_DayRange)
bpy.utils.unregister_class(SunPos_OT_PreferencesDone)
bpy.utils.unregister_class(SunPos_OT_Preferences)
bpy.utils.unregister_class(SunPos_OT_Controller)
del bpy.types.Scene.SunPos_pref_property
bpy.utils.unregister_class(SunPosPreferences)
del bpy.types.Scene.SunPos_property
bpy.utils.unregister_class(SunPosSettings)