dfelinto noticed text editor section was missing.
[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_field",
47     "properties_physics_fluid",
48     "properties_physics_smoke",
49     "properties_physics_softbody",
50     "properties_render",
51     "properties_scene",
52     "properties_texture",
53     "properties_world",
54     "space_console",
55     "space_dopesheet",
56     "space_filebrowser",
57     "space_graph",
58     "space_image",
59     "space_info",
60     "space_logic",
61     "space_nla",
62     "space_node",
63     "space_outliner",
64     "space_sequencer",
65     "space_text",
66     "space_time",
67     "space_userpref_keymap",
68     "space_userpref",
69     "space_view3d",
70     "space_view3d_toolbar",
71 )
72 __import__(name=__name__, fromlist=_modules)
73 _namespace = globals()
74 _modules_loaded = {name: _namespace[name] for name in _modules}
75 del _namespace
76
77
78 import bpy
79
80
81 def register():
82     bpy.utils.register_module(__name__)
83
84     # space_userprefs.py
85     from bpy.props import StringProperty, EnumProperty
86     WindowManager = bpy.types.WindowManager
87
88     WindowManager.addon_search = StringProperty(name="Search", description="Search within the selected filter")
89     WindowManager.addon_filter = EnumProperty(
90             items=[('All', "All", ""),
91                    ('Enabled', "Enabled", ""),
92                    ('Disabled', "Disabled", ""),
93                    ('3D View', "3D View", ""),
94                    ('Add Curve', "Add Curve", ""),
95                    ('Add Mesh', "Add Mesh", ""),
96                    ('Animation', "Animation", ""),
97                    ('Development', "Development", ""),
98                    ('Game Engine', "Game Engine", ""),
99                    ('Import-Export', "Import-Export", ""),
100                    ('Mesh', "Mesh", ""),
101                    ('Object', "Object", ""),
102                    ('Render', "Render", ""),
103                    ('Rigging', "Rigging", ""),
104                    ('Text Editor', "Text Editor", ""),
105                    ('System', "System", "")
106                    ],
107             name="Category",
108             description="Filter add-ons by category",
109             )
110
111     WindowManager.addon_support = EnumProperty(
112             items=[('OFFICIAL', "Official", ""),
113                    ('COMMUNITY', 'Community', ""),
114                   ],
115             name="Support",
116             description="Display support level", default={'OFFICIAL', 'COMMUNITY'}, options={'ENUM_FLAG'})
117     # done...
118
119
120 def unregister():
121     bpy.utils.unregister_module(__name__)