Applied Dynamic Paint 1.18f patch as a codebase for GSoC.
[blender.git] / release / scripts / startup / bl_ui / __init__.py
1 # ##### BEGIN GPL LICENSE BLOCK #####
2 #
3 #  This program is free software; you can redistribute it and/or
4 #  modify it under the terms of the GNU General Public License
5 #  as published by the Free Software Foundation; either version 2
6 #  of the License, or (at your option) any later version.
7 #
8 #  This program is distributed in the hope that it will be useful,
9 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 #  GNU General Public License for more details.
12 #
13 #  You should have received a copy of the GNU General Public License
14 #  along with this program; if not, write to the Free Software Foundation,
15 #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # ##### END GPL LICENSE BLOCK #####
18
19 # <pep8 compliant>
20
21 # note, properties_animviz is a helper module only.
22
23 if "bpy" in locals():
24     from imp import reload as _reload
25     for val in _modules_loaded.values():
26         _reload(val)
27 _modules = (
28     "properties_animviz",
29     "properties_data_armature",
30     "properties_data_bone",
31     "properties_data_camera",
32     "properties_data_curve",
33     "properties_data_empty",
34     "properties_data_lamp",
35     "properties_data_lattice",
36     "properties_data_mesh",
37     "properties_data_metaball",
38     "properties_data_modifier",
39     "properties_game",
40     "properties_material",
41     "properties_object_constraint",
42     "properties_object",
43     "properties_particle",
44     "properties_physics_cloth",
45     "properties_physics_common",
46     "properties_physics_dynamicpaint",
47     "properties_physics_field",
48     "properties_physics_fluid",
49     "properties_physics_smoke",
50     "properties_physics_softbody",
51     "properties_render",
52     "properties_scene",
53     "properties_texture",
54     "properties_world",
55     "space_console",
56     "space_dopesheet",
57     "space_filebrowser",
58     "space_graph",
59     "space_image",
60     "space_info",
61     "space_logic",
62     "space_nla",
63     "space_node",
64     "space_outliner",
65     "space_sequencer",
66     "space_text",
67     "space_time",
68     "space_userpref_keymap",
69     "space_userpref",
70     "space_view3d",
71     "space_view3d_toolbar",
72 )
73 __import__(name=__name__, fromlist=_modules)
74 _namespace = globals()
75 _modules_loaded = {name: _namespace[name] for name in _modules}
76 del _namespace
77
78
79 import bpy
80
81
82 def register():
83     bpy.utils.register_module(__name__)
84
85     # space_userprefs.py
86     from bpy.props import StringProperty, EnumProperty
87     WindowManager = bpy.types.WindowManager
88
89     WindowManager.addon_search = StringProperty(name="Search", description="Search within the selected filter")
90     WindowManager.addon_filter = EnumProperty(
91             items=[('All', "All", ""),
92                    ('Enabled', "Enabled", ""),
93                    ('Disabled', "Disabled", ""),
94                    ('3D View', "3D View", ""),
95                    ('Add Curve', "Add Curve", ""),
96                    ('Add Mesh', "Add Mesh", ""),
97                    ('Animation', "Animation", ""),
98                    ('Development', "Development", ""),
99                    ('Game Engine', "Game Engine", ""),
100                    ('Import-Export', "Import-Export", ""),
101                    ('Mesh', "Mesh", ""),
102                    ('Object', "Object", ""),
103                    ('Render', "Render", ""),
104                    ('Rigging', "Rigging", ""),
105                    ('Text Editor', "Text Editor", ""),
106                    ('System', "System", ""),
107                    ('Other', "Other", ""),
108                    ],
109             name="Category",
110             description="Filter add-ons by category",
111             )
112
113     WindowManager.addon_support = EnumProperty(
114             items=[('OFFICIAL', "Official", ""),
115                    ('COMMUNITY', 'Community', ""),
116                   ],
117             name="Support",
118             description="Display support level", default={'OFFICIAL', 'COMMUNITY'}, options={'ENUM_FLAG'})
119     # done...
120
121
122 def unregister():
123     bpy.utils.unregister_module(__name__)