move script directories for internal blender scripts.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 21 Mar 2011 12:35:49 +0000 (12:35 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 21 Mar 2011 12:35:49 +0000 (12:35 +0000)
ui/ --> startup/bl_ui
op/ --> startup/bl_operators

scripts/startup/ is now the only auto-loading script dir which gives some speedup for blender loading too.

~/.blender/2.56/scripts/startup works for auto-loading scripts too.

66 files changed:
release/scripts/modules/bpy/__init__.py
release/scripts/modules/bpy/utils.py
release/scripts/modules/console_python.py [moved from release/scripts/op/console_python.py with 98% similarity]
release/scripts/modules/console_shell.py [moved from release/scripts/op/console_shell.py with 95% similarity]
release/scripts/startup/bl_operators/add_mesh_torus.py [moved from release/scripts/op/add_mesh_torus.py with 92% similarity]
release/scripts/startup/bl_operators/animsys_update.py [moved from release/scripts/op/animsys_update.py with 99% similarity]
release/scripts/startup/bl_operators/fcurve_euler_filter.py [moved from release/scripts/op/fcurve_euler_filter.py with 94% similarity]
release/scripts/startup/bl_operators/image.py [moved from release/scripts/op/image.py with 97% similarity]
release/scripts/startup/bl_operators/mesh.py [moved from release/scripts/op/mesh.py with 97% similarity]
release/scripts/startup/bl_operators/nla.py [moved from release/scripts/op/nla.py with 95% similarity]
release/scripts/startup/bl_operators/object.py [moved from release/scripts/op/object.py with 99% similarity]
release/scripts/startup/bl_operators/object_align.py [moved from release/scripts/op/object_align.py with 95% similarity]
release/scripts/startup/bl_operators/object_randomize_transform.py [moved from release/scripts/op/object_randomize_transform.py with 92% similarity]
release/scripts/startup/bl_operators/presets.py [moved from release/scripts/op/presets.py with 98% similarity]
release/scripts/startup/bl_operators/screen_play_rendered_anim.py [moved from release/scripts/op/screen_play_rendered_anim.py with 96% similarity]
release/scripts/startup/bl_operators/sequencer.py [moved from release/scripts/op/sequencer.py with 96% similarity]
release/scripts/startup/bl_operators/uvcalc_follow_active.py [moved from release/scripts/op/uvcalc_follow_active.py with 95% similarity]
release/scripts/startup/bl_operators/uvcalc_lightmap.py [moved from release/scripts/op/uvcalc_lightmap.py with 96% similarity]
release/scripts/startup/bl_operators/uvcalc_smart_project.py [moved from release/scripts/op/uvcalc_smart_project.py with 98% similarity]
release/scripts/startup/bl_operators/vertexpaint_dirt.py [moved from release/scripts/op/vertexpaint_dirt.py with 97% similarity]
release/scripts/startup/bl_operators/wm.py [moved from release/scripts/op/wm.py with 91% similarity]
release/scripts/startup/bl_ui/__init__.py [new file with mode: 0644]
release/scripts/startup/bl_ui/properties_animviz.py [moved from release/scripts/ui/properties_animviz.py with 94% similarity]
release/scripts/startup/bl_ui/properties_data_armature.py [moved from release/scripts/ui/properties_data_armature.py with 97% similarity]
release/scripts/startup/bl_ui/properties_data_bone.py [moved from release/scripts/ui/properties_data_bone.py with 98% similarity]
release/scripts/startup/bl_ui/properties_data_camera.py [moved from release/scripts/ui/properties_data_camera.py with 96% similarity]
release/scripts/startup/bl_ui/properties_data_curve.py [moved from release/scripts/ui/properties_data_curve.py with 98% similarity]
release/scripts/startup/bl_ui/properties_data_empty.py [moved from release/scripts/ui/properties_data_empty.py with 89% similarity]
release/scripts/startup/bl_ui/properties_data_lamp.py [moved from release/scripts/ui/properties_data_lamp.py with 98% similarity]
release/scripts/startup/bl_ui/properties_data_lattice.py [moved from release/scripts/ui/properties_data_lattice.py with 93% similarity]
release/scripts/startup/bl_ui/properties_data_mesh.py [moved from release/scripts/ui/properties_data_mesh.py with 98% similarity]
release/scripts/startup/bl_ui/properties_data_metaball.py [moved from release/scripts/ui/properties_data_metaball.py with 95% similarity]
release/scripts/startup/bl_ui/properties_data_modifier.py [moved from release/scripts/ui/properties_data_modifier.py with 99% similarity]
release/scripts/startup/bl_ui/properties_game.py [moved from release/scripts/ui/properties_game.py with 98% similarity]
release/scripts/startup/bl_ui/properties_material.py [moved from release/scripts/ui/properties_material.py with 99% similarity]
release/scripts/startup/bl_ui/properties_object.py [moved from release/scripts/ui/properties_object.py with 97% similarity]
release/scripts/startup/bl_ui/properties_object_constraint.py [moved from release/scripts/ui/properties_object_constraint.py with 99% similarity]
release/scripts/startup/bl_ui/properties_particle.py [moved from release/scripts/ui/properties_particle.py with 99% similarity]
release/scripts/startup/bl_ui/properties_physics_cloth.py [moved from release/scripts/ui/properties_physics_cloth.py with 96% similarity]
release/scripts/startup/bl_ui/properties_physics_common.py [moved from release/scripts/ui/properties_physics_common.py with 98% similarity]
release/scripts/startup/bl_ui/properties_physics_field.py [moved from release/scripts/ui/properties_physics_field.py with 95% similarity]
release/scripts/startup/bl_ui/properties_physics_fluid.py [moved from release/scripts/ui/properties_physics_fluid.py with 98% similarity]
release/scripts/startup/bl_ui/properties_physics_smoke.py [moved from release/scripts/ui/properties_physics_smoke.py with 95% similarity]
release/scripts/startup/bl_ui/properties_physics_softbody.py [moved from release/scripts/ui/properties_physics_softbody.py with 96% similarity]
release/scripts/startup/bl_ui/properties_render.py [moved from release/scripts/ui/properties_render.py with 99% similarity]
release/scripts/startup/bl_ui/properties_scene.py [moved from release/scripts/ui/properties_scene.py with 98% similarity]
release/scripts/startup/bl_ui/properties_texture.py [moved from release/scripts/ui/properties_texture.py with 99% similarity]
release/scripts/startup/bl_ui/properties_world.py [moved from release/scripts/ui/properties_world.py with 98% similarity]
release/scripts/startup/bl_ui/space_console.py [moved from release/scripts/ui/space_console.py with 96% similarity]
release/scripts/startup/bl_ui/space_dopesheet.py [moved from release/scripts/ui/space_dopesheet.py with 98% similarity]
release/scripts/startup/bl_ui/space_filebrowser.py [moved from release/scripts/ui/space_filebrowser.py with 94% similarity]
release/scripts/startup/bl_ui/space_graph.py [moved from release/scripts/ui/space_graph.py with 97% similarity]
release/scripts/startup/bl_ui/space_image.py [moved from release/scripts/ui/space_image.py with 99% similarity]
release/scripts/startup/bl_ui/space_info.py [moved from release/scripts/ui/space_info.py with 98% similarity]
release/scripts/startup/bl_ui/space_logic.py [moved from release/scripts/ui/space_logic.py with 94% similarity]
release/scripts/startup/bl_ui/space_nla.py [moved from release/scripts/ui/space_nla.py with 97% similarity]
release/scripts/startup/bl_ui/space_node.py [moved from release/scripts/ui/space_node.py with 97% similarity]
release/scripts/startup/bl_ui/space_outliner.py [moved from release/scripts/ui/space_outliner.py with 95% similarity]
release/scripts/startup/bl_ui/space_sequencer.py [moved from release/scripts/ui/space_sequencer.py with 99% similarity]
release/scripts/startup/bl_ui/space_text.py [moved from release/scripts/ui/space_text.py with 97% similarity]
release/scripts/startup/bl_ui/space_time.py [moved from release/scripts/ui/space_time.py with 97% similarity]
release/scripts/startup/bl_ui/space_userpref.py [moved from release/scripts/ui/space_userpref.py with 96% similarity]
release/scripts/startup/bl_ui/space_userpref_keymap.py [moved from release/scripts/ui/space_userpref_keymap.py with 99% similarity]
release/scripts/startup/bl_ui/space_view3d.py [moved from release/scripts/ui/space_view3d.py with 99% similarity]
release/scripts/startup/bl_ui/space_view3d_toolbar.py [moved from release/scripts/ui/space_view3d_toolbar.py with 99% similarity]
release/scripts/startup/keyingsets_builtins.py [moved from release/scripts/keyingsets/keyingsets_builtins.py with 100% similarity]

index ed7b4ba..efb1cf5 100644 (file)
@@ -53,5 +53,65 @@ def _main():
     else:
         utils.load_scripts()
 
+    import os
+
+    # test for X11
+    if os.environ.get("DISPLAY"):
+
+        # BSD licenced code copied from python, temp fix for bug
+        # http://bugs.python.org/issue11432, XXX == added code
+        def _invoke(self, args, remote, autoraise):
+            # XXX, added imports
+            import io
+            import subprocess
+            import time
+
+            raise_opt = []
+            if remote and self.raise_opts:
+                # use autoraise argument only for remote invocation
+                autoraise = int(autoraise)
+                opt = self.raise_opts[autoraise]
+                if opt:
+                    raise_opt = [opt]
+
+            cmdline = [self.name] + raise_opt + args
+
+            if remote or self.background:
+                inout = io.open(os.devnull, "r+")
+            else:
+                # for TTY browsers, we need stdin/out
+                inout = None
+            # if possible, put browser in separate process group, so
+            # keyboard interrupts don't affect browser as well as Python
+            setsid = getattr(os, 'setsid', None)
+            if not setsid:
+                setsid = getattr(os, 'setpgrp', None)
+
+            p = subprocess.Popen(cmdline, close_fds=True,  # XXX, stdin=inout,
+                                 stdout=(self.redirect_stdout and inout or None),
+                                 stderr=inout, preexec_fn=setsid)
+            if remote:
+                # wait five secons. If the subprocess is not finished, the
+                # remote invocation has (hopefully) started a new instance.
+                time.sleep(1)
+                rc = p.poll()
+                if rc is None:
+                    time.sleep(4)
+                    rc = p.poll()
+                    if rc is None:
+                        return True
+                # if remote call failed, open() will try direct invocation
+                return not rc
+            elif self.background:
+                if p.poll() is None:
+                    return True
+                else:
+                    return False
+            else:
+                return not p.wait()
+
+        import webbrowser
+        webbrowser.UnixBrowser._invoke = _invoke
+
 
 _main()
index 32f3a39..8f1fdc2 100644 (file)
@@ -185,7 +185,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
     user_path = user_script_path()
 
     for base_path in script_paths():
-        for path_subdir in ("", "ui", "op", "io", "keyingsets", "modules"):
+        for path_subdir in ("startup", "modules"):
             path = _os.path.join(base_path, path_subdir)
             if _os.path.isdir(path):
                 _sys_path_ensure(path)
similarity index 98%
rename from release/scripts/op/console_python.py
rename to release/scripts/modules/console_python.py
index 4a2eb83..c25103e 100644 (file)
@@ -304,15 +304,3 @@ def banner(context):
     sc.prompt = PROMPT
 
     return {'FINISHED'}
-
-
-def register():
-    pass
-
-
-def unregister():
-    pass
-
-
-if __name__ == "__main__":
-    register()
similarity index 95%
rename from release/scripts/op/console_shell.py
rename to release/scripts/modules/console_shell.py
index 2c5b48a..7a6f45c 100644 (file)
@@ -76,14 +76,3 @@ def banner(context):
     sc.prompt = os.getcwd() + PROMPT
 
     return {'FINISHED'}
-
-
-def register():
-    pass
-
-
-def unregister():
-    pass
-
-if __name__ == "__main__":
-    register()
@@ -136,20 +136,3 @@ class AddTorus(bpy.types.Operator):
         add_object_utils.object_data_add(context, mesh, operator=self)
 
         return {'FINISHED'}
-
-
-def menu_func(self, context):
-    self.layout.operator(AddTorus.bl_idname, text="Torus", icon='MESH_TORUS')
-
-
-def register():
-    bpy.utils.register_class(AddTorus)
-    bpy.types.INFO_MT_mesh_add.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_class(AddTorus)
-    bpy.types.INFO_MT_mesh_add.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
@@ -694,15 +694,3 @@ class UpdateAnimData(bpy.types.Operator):
         import animsys_refactor
         animsys_refactor.update_data_paths(data_path_update)
         return {'FINISHED'}
-
-
-if __name__ == "__main__":
-    bpy.ops.anim.update_data_paths()
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
@@ -76,14 +76,3 @@ class DiscontFilterOp(bpy.types.Operator):
     def execute(self, context):
         main(context)
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 97%
rename from release/scripts/op/image.py
rename to release/scripts/startup/bl_operators/image.py
index 67188e9..82e631e 100644 (file)
@@ -187,14 +187,3 @@ class ProjectApply(bpy.types.Operator):
         bpy.ops.paint.project_image(image=image_name)
 
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 97%
rename from release/scripts/op/mesh.py
rename to release/scripts/startup/bl_operators/mesh.py
index 87adb37..a37a83f 100644 (file)
@@ -170,14 +170,3 @@ class MeshMirrorUV(bpy.types.Operator):
             bpy.ops.object.mode_set(mode='EDIT', toggle=False)
 
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 95%
rename from release/scripts/op/nla.py
rename to release/scripts/startup/bl_operators/nla.py
index 284c6ca..923ca92 100644 (file)
@@ -168,18 +168,3 @@ class BakeAction(bpy.types.Operator):
     def invoke(self, context, event):
         wm = context.window_manager
         return wm.invoke_props_dialog(self)
-
-
-#def menu_func(self, context):
-#    self.layout.operator(BakeAction.bl_idname, text="Bake Armature Action")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 99%
rename from release/scripts/op/object.py
rename to release/scripts/startup/bl_operators/object.py
index 7b39281..db5eacc 100644 (file)
@@ -561,14 +561,3 @@ class ClearAllRestrictRender(bpy.types.Operator):
         for obj in context.scene.objects:
             obj.hide_render = False
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 95%
rename from release/scripts/op/object_align.py
rename to release/scripts/startup/bl_operators/object_align.py
index 4dd4ebd..644f30a 100644 (file)
@@ -278,23 +278,3 @@ class AlignObjects(bpy.types.Operator):
             return {'CANCELLED'}
         else:
             return {'FINISHED'}
-
-
-def menu_func(self, context):
-    if context.mode == 'OBJECT':
-        self.layout.operator(AlignObjects.bl_idname,
-        text="Align Objects")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.VIEW3D_MT_transform.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.VIEW3D_MT_transform.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
@@ -145,23 +145,3 @@ class RandomizeLocRotSize(bpy.types.Operator):
         randomize_selected(seed, delta, loc, rot, scale, scale_even)
 
         return {'FINISHED'}
-
-
-def menu_func(self, context):
-    if context.mode == 'OBJECT':
-        self.layout.operator(RandomizeLocRotSize.bl_idname,
-        text="Randomize Transform")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.VIEW3D_MT_transform.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.VIEW3D_MT_transform.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
similarity index 98%
rename from release/scripts/op/presets.py
rename to release/scripts/startup/bl_operators/presets.py
index 65653ae..e6f71ef 100644 (file)
@@ -351,14 +351,3 @@ class WM_MT_operator_presets(bpy.types.Menu):
         return AddPresetOperator.operator_path(self.operator)
 
     preset_operator = "script.execute_preset"
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -140,14 +140,3 @@ class PlayRenderedAnim(bpy.types.Operator):
             #raise OSError("Couldn't find an external animation player.")
 
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 96%
rename from release/scripts/op/sequencer.py
rename to release/scripts/startup/bl_operators/sequencer.py
index 45a2715..16b7240 100644 (file)
@@ -132,15 +132,3 @@ class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
                 s.use_deinterlace = True
 
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-
-if __name__ == "__main__":
-    register()
@@ -248,22 +248,3 @@ class FollowActiveQuads(bpy.types.Operator):
     def invoke(self, context, event):
         wm = context.window_manager
         return wm.invoke_props_dialog(self)
-
-
-def menu_func(self, context):
-    self.layout.operator_context = 'INVOKE_REGION_WIN'
-    self.layout.operator(FollowActiveQuads.bl_idname)
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.VIEW3D_MT_uv_map.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
@@ -580,28 +580,3 @@ class LightMapPack(bpy.types.Operator):
     def invoke(self, context, event):
         wm = context.window_manager
         return wm.invoke_props_dialog(self)
-
-
-def menu_func(self, context):
-    self.layout.operator_context = 'INVOKE_REGION_WIN'
-    self.layout.operator(LightMapPack.bl_idname)
-
-
-def register():
-    bpy.utils.register_class(LightMapPack)
-    bpy.types.VIEW3D_MT_uv_map.append(menu_func)
-
-
-def unregister():
-    bpy.utils.register_class(LightMapPack)
-    bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
-
-    '''
-    bpy.ops.import_scene.obj(filepath="/untitled.obj")
-    bpy.ops.uv.lightmap_pack(PREF_NEW_UVLAYER=1, PREF_APPLY_IMAGE=1, PREF_PACK_IN_ONE=1, PREF_CONTEXT='ALL_OBJECTS')
-    bpy.ops.wm.save_mainfile(filepath="/untitled.blend", check_existing=False)
-    '''
@@ -1139,21 +1139,3 @@ class SmartProject(bpy.types.Operator):
     def invoke(self, context, event):
         wm = context.window_manager
         return wm.invoke_props_dialog(self)
-
-
-def menu_func(self, context):
-    self.layout.operator_context = 'INVOKE_REGION_WIN'
-    self.layout.operator(SmartProject.bl_idname, text="Smart Project")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.VIEW3D_MT_uv_map.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
@@ -146,7 +146,6 @@ from bpy.props import FloatProperty, IntProperty, BoolProperty
 
 
 class VertexPaintDirt(bpy.types.Operator):
-
     bl_idname = "paint.vertex_color_dirt"
     bl_label = "Dirty Vertex Colors"
     bl_options = {'REGISTER', 'UNDO'}
@@ -175,14 +174,3 @@ class VertexPaintDirt(bpy.types.Operator):
         print('Dirt calculated in %.6f' % (time.time() - t))
 
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 91%
rename from release/scripts/op/wm.py
rename to release/scripts/startup/bl_operators/wm.py
index 795e9c6..7e73fa7 100644 (file)
@@ -846,74 +846,3 @@ class WM_OT_sysinfo(bpy.types.Operator):
         import sys_info
         sys_info.write_sysinfo(self)
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    import os
-
-    # test for X11
-    if os.environ.get("DISPLAY"):
-
-        # BSD licenced code copied from python, temp fix for bug
-        # http://bugs.python.org/issue11432, XXX == added code
-        def _invoke(self, args, remote, autoraise):
-            # XXX, added imports
-            import io
-            import subprocess
-            import time
-
-            raise_opt = []
-            if remote and self.raise_opts:
-                # use autoraise argument only for remote invocation
-                autoraise = int(autoraise)
-                opt = self.raise_opts[autoraise]
-                if opt:
-                    raise_opt = [opt]
-
-            cmdline = [self.name] + raise_opt + args
-
-            if remote or self.background:
-                inout = io.open(os.devnull, "r+")
-            else:
-                # for TTY browsers, we need stdin/out
-                inout = None
-            # if possible, put browser in separate process group, so
-            # keyboard interrupts don't affect browser as well as Python
-            setsid = getattr(os, 'setsid', None)
-            if not setsid:
-                setsid = getattr(os, 'setpgrp', None)
-
-            p = subprocess.Popen(cmdline, close_fds=True,  # XXX, stdin=inout,
-                                 stdout=(self.redirect_stdout and inout or None),
-                                 stderr=inout, preexec_fn=setsid)
-            if remote:
-                # wait five secons. If the subprocess is not finished, the
-                # remote invocation has (hopefully) started a new instance.
-                time.sleep(1)
-                rc = p.poll()
-                if rc is None:
-                    time.sleep(4)
-                    rc = p.poll()
-                    if rc is None:
-                        return True
-                # if remote call failed, open() will try direct invocation
-                return not rc
-            elif self.background:
-                if p.poll() is None:
-                    return True
-                else:
-                    return False
-            else:
-                return not p.wait()
-
-        import webbrowser
-        webbrowser.UnixBrowser._invoke = _invoke
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py
new file mode 100644 (file)
index 0000000..69f5d2a
--- /dev/null
@@ -0,0 +1,120 @@
+# ##### 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 #####
+
+# <pep8 compliant>
+
+# note, properties_animviz is a helper module only.
+
+if "bpy" in locals():
+    from imp import reload as _reload
+    for val in _modules_loaded.values():
+        _reload(val)
+_modules = (
+    "properties_animviz",
+    "properties_data_armature",
+    "properties_data_bone",
+    "properties_data_camera",
+    "properties_data_curve",
+    "properties_data_empty",
+    "properties_data_lamp",
+    "properties_data_lattice",
+    "properties_data_mesh",
+    "properties_data_metaball",
+    "properties_data_modifier",
+    "properties_game",
+    "properties_material",
+    "properties_object_constraint",
+    "properties_object",
+    "properties_particle",
+    "properties_physics_cloth",
+    "properties_physics_common",
+    "properties_physics_field",
+    "properties_physics_fluid",
+    "properties_physics_smoke",
+    "properties_physics_softbody",
+    "properties_render",
+    "properties_scene",
+    "properties_texture",
+    "properties_world",
+    "space_console",
+    "space_dopesheet",
+    "space_filebrowser",
+    "space_graph",
+    "space_image",
+    "space_info",
+    "space_logic",
+    "space_nla",
+    "space_node",
+    "space_outliner",
+    "space_sequencer",
+    "space_text",
+    "space_time",
+    "space_userpref_keymap",
+    "space_userpref",
+    "space_view3d",
+    "space_view3d_toolbar",
+)
+__import__(name=__name__, fromlist=_modules)
+_namespace = globals()
+_modules_loaded = {name: _namespace[name] for name in _modules}
+del _namespace
+
+
+import bpy
+
+
+def register():
+    bpy.utils.register_module(__name__)
+
+    # space_userprefs.py
+    from bpy.props import StringProperty, EnumProperty
+    WindowManager = bpy.types.WindowManager
+
+    WindowManager.addon_search = StringProperty(name="Search", description="Search within the selected filter")
+    WindowManager.addon_filter = EnumProperty(
+            items=[('All', "All", ""),
+                   ('Enabled', "Enabled", ""),
+                   ('Disabled', "Disabled", ""),
+                   ('3D View', "3D View", ""),
+                   ('Add Curve', "Add Curve", ""),
+                   ('Add Mesh', "Add Mesh", ""),
+                   ('Animation', "Animation", ""),
+                   ('Development', "Development", ""),
+                   ('Game Engine', "Game Engine", ""),
+                   ('Import-Export', "Import-Export", ""),
+                   ('Mesh', "Mesh", ""),
+                   ('Object', "Object", ""),
+                   ('Render', "Render", ""),
+                   ('Rigging', "Rigging", ""),
+                   ('System', "System", "")
+                   ],
+            name="Category",
+            description="Filter add-ons by category",
+            )
+
+    WindowManager.addon_support = EnumProperty(
+            items=[('OFFICIAL', "Official", ""),
+                   ('COMMUNITY', 'Community', ""),
+                  ],
+            name="Support",
+            description="Display support level", default={'OFFICIAL', 'COMMUNITY'}, options={'ENUM_FLAG'})
+    # done...
+
+
+def unregister():
+    bpy.utils.unregister_module(__name__)
@@ -22,6 +22,10 @@ import bpy
 
 # Generic Panels (Independent of DataType)
 
+# NOTE:
+# The specialised panel types are derived in their respective UI modules
+# dont register these classes since they are only helpers.
+
 
 class MotionPathButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -90,17 +94,3 @@ class OnionSkinButtonsPanel():
         col = split.column()
         col.label(text="Display:")
         col.prop(arm, "show_only_ghost_selected", text="Selected Only")
-
-
-# NOTE:
-# The specialised panel types are derived in their respective UI modules
-# dont register these classes since they are only helpers.
-def register():
-    pass  # bpy.utils.register_module(__name__)
-
-
-def unregister():
-    pass  # bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -20,7 +20,6 @@
 import bpy
 from rna_prop_ui import PropertyPanel
 
-
 class ArmatureButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
@@ -260,8 +259,10 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
                 row.prop(itasc, "damping_max", text="Damp", slider=True)
                 row.prop(itasc, "damping_epsilon", text="Eps", slider=True)
 
-from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel
-
+from bl_ui.properties_animviz import (
+    MotionPathButtonsPanel,
+    OnionSkinButtonsPanel,
+    )
 
 class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
     #bl_label = "Bones Motion Paths"
@@ -307,14 +308,3 @@ class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, bpy.types.Pa
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Armature
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -17,6 +17,7 @@
 # ##### END GPL LICENSE BLOCK #####
 
 # <pep8 compliant>
+
 import bpy
 from rna_prop_ui import PropertyPanel
 
@@ -367,14 +368,3 @@ class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel):
             return "active_pose_bone"
         else:
             return "active_bone"
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -134,14 +134,3 @@ class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, bpy.types.P
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Camera
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -390,14 +390,3 @@ class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, bpy.types.Pan
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Curve
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -40,14 +40,3 @@ class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
 
         layout.prop(ob, "empty_draw_type", text="Display")
         layout.prop(ob, "empty_draw_size", text="Size")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -384,14 +384,3 @@ class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, bpy.types.Panel
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Lamp
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -80,14 +80,3 @@ class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, bpy.types.Pa
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Lattice
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -349,14 +349,3 @@ class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, bpy.types.Panel
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Mesh
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -116,14 +116,3 @@ class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.P
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.MetaBall
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -699,14 +699,3 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         col = split.column()
         col.prop(md, "width", slider=True)
         col.prop(md, "narrowness", slider=True)
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 98%
rename from release/scripts/ui/properties_game.py
rename to release/scripts/startup/bl_ui/properties_game.py
index 4c6bb0e..d04f486 100644 (file)
@@ -496,14 +496,3 @@ class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
             col = split.column()
             col.label(text="Logic Steps:")
             col.prop(gs, "logic_step_max", text="Max")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -967,14 +967,3 @@ class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, bpy.types.Pa
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "material"
     _property_type = bpy.types.Material
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 97%
rename from release/scripts/ui/properties_object.py
rename to release/scripts/startup/bl_ui/properties_object.py
index 4c1f4d2..e906fc8 100644 (file)
@@ -288,7 +288,11 @@ class OBJECT_PT_animation(ObjectButtonsPanel, bpy.types.Panel):
         col.prop(ob, "track_axis", text="Axis")
         col.prop(ob, "up_axis", text="Up Axis")
 
-from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel
+
+from bl_ui.properties_animviz import (
+    MotionPathButtonsPanel,
+    OnionSkinButtonsPanel,
+    )
 
 
 class OBJECT_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
@@ -331,14 +335,3 @@ class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, bpy.types.Panel)
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object"
     _property_type = bpy.types.Object
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -779,14 +779,3 @@ class BONE_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
 
         for con in context.pose_bone.constraints:
             self.draw_constraint(context, con)
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
 import bpy
 from rna_prop_ui import PropertyPanel
 
-from properties_physics_common import point_cache_ui
-from properties_physics_common import effector_weights_ui
-from properties_physics_common import basic_force_field_settings_ui
-from properties_physics_common import basic_force_field_falloff_ui
+from bl_ui.properties_physics_common import (
+    point_cache_ui,
+    effector_weights_ui,
+    basic_force_field_settings_ui,
+    basic_force_field_falloff_ui,
+    )
 
 
 def particle_panel_enabled(context, psys):
@@ -1209,14 +1211,3 @@ class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Pa
     COMPAT_ENGINES = {'BLENDER_RENDER'}
     _context_path = "particle_system.settings"
     _property_type = bpy.types.ParticleSettings
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
 import bpy
 
 
-from properties_physics_common import point_cache_ui
-from properties_physics_common import effector_weights_ui
+from bl_ui.properties_physics_common import (
+    point_cache_ui,
+    effector_weights_ui,
+    )
 
 
 def cloth_panel_enabled(md):
@@ -214,14 +216,3 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, bpy.types.Panel):
     def draw(self, context):
         cloth = context.cloth.settings
         effector_weights_ui(self, context, cloth.effector_weights)
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -280,14 +280,3 @@ def basic_force_field_falloff_ui(self, context, field):
     sub = row.row()
     sub.active = field.use_max_distance
     sub.prop(field, "distance_max", text="Maximum")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
 import bpy
 
 
-from properties_physics_common import basic_force_field_settings_ui
-from properties_physics_common import basic_force_field_falloff_ui
+from bl_ui.properties_physics_common import (
+    basic_force_field_settings_ui,
+    basic_force_field_falloff_ui,
+    )
 
 
 class PhysicButtonsPanel():
@@ -214,14 +216,3 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
 
             col.label(text="Force Fields:")
             col.prop(settings, "absorption", text="Absorption")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -279,14 +279,3 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel, bpy.types.Panel):
         col = layout.column(align=True)
         col.prop(fluid, "tracer_particles")
         col.prop(fluid, "generate_particles")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
 import bpy
 
 
-from properties_physics_common import point_cache_ui
-from properties_physics_common import effector_weights_ui
+from bl_ui.properties_physics_common import (
+    point_cache_ui,
+    effector_weights_ui,
+    )
 
 
 class PhysicButtonsPanel():
@@ -199,14 +201,3 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, bpy.types.Panel):
     def draw(self, context):
         domain = context.smoke.domain_settings
         effector_weights_ui(self, context, domain.effector_weights)
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
 import bpy
 
 
-from properties_physics_common import point_cache_ui
-from properties_physics_common import effector_weights_ui
+from bl_ui.properties_physics_common import (
+    point_cache_ui,
+    effector_weights_ui,
+    )
 
 
 def softbody_panel_enabled(md):
@@ -259,14 +261,3 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, bpy.types.Panel):
         softbody = md.settings
 
         effector_weights_ui(self, context, softbody.effector_weights)
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 99%
rename from release/scripts/ui/properties_render.py
rename to release/scripts/startup/bl_ui/properties_render.py
index c5e56a6..e4be38c 100644 (file)
@@ -636,14 +636,3 @@ class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
         sub.active = rd.use_bake_selected_to_active
         sub.prop(rd, "bake_distance")
         sub.prop(rd, "bake_bias")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 98%
rename from release/scripts/ui/properties_scene.py
rename to release/scripts/startup/bl_ui/properties_scene.py
index e28753f..0f25523 100644 (file)
@@ -301,14 +301,3 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
         wm = context.window_manager
         wm.fileselect_add(self)
         return {'RUNNING_MODAL'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -43,7 +43,7 @@ class TEXTURE_MT_envmap_specials(bpy.types.Menu):
         layout.operator("texture.envmap_clear", icon='FILE_REFRESH')
         layout.operator("texture.envmap_clear_all", icon='FILE_REFRESH')
 
-from properties_material import active_node_mat
+from bl_ui.properties_material import active_node_mat
 
 
 def context_tex_datablock(context):
@@ -1028,14 +1028,3 @@ class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, bpy.types.Pane
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "texture"
     _property_type = bpy.types.Texture
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 98%
rename from release/scripts/ui/properties_world.py
rename to release/scripts/startup/bl_ui/properties_world.py
index fd11f29..1b2dd4e 100644 (file)
@@ -265,14 +265,3 @@ class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "world"
     _property_type = bpy.types.World
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 96%
rename from release/scripts/ui/space_console.py
rename to release/scripts/startup/bl_ui/space_console.py
index 7e75c05..591765c 100644 (file)
@@ -158,14 +158,3 @@ class ConsoleLanguage(bpy.types.Operator):
             remove_duplicates=True)
 
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 98%
rename from release/scripts/ui/space_dopesheet.py
rename to release/scripts/startup/bl_ui/space_dopesheet.py
index 57b5a1f..1ba9a62 100644 (file)
@@ -360,14 +360,3 @@ class DOPESHEET_MT_gpencil_frame(bpy.types.Menu):
         #layout.separator()
         #layout.operator("action.copy")
         #layout.operator("action.paste")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 94%
rename from release/scripts/ui/space_filebrowser.py
rename to release/scripts/startup/bl_ui/space_filebrowser.py
index 0c55143..3033ba1 100644 (file)
@@ -72,14 +72,3 @@ class FILEBROWSER_HT_header(bpy.types.Header):
                 row.prop(params, "use_filter_font", text="")
                 row.prop(params, "use_filter_sound", text="")
                 row.prop(params, "use_filter_text", text="")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 97%
rename from release/scripts/ui/space_graph.py
rename to release/scripts/startup/bl_ui/space_graph.py
index f0c987c..4e1b5aa 100644 (file)
@@ -25,7 +25,7 @@ class GRAPH_HT_header(bpy.types.Header):
     bl_space_type = 'GRAPH_EDITOR'
 
     def draw(self, context):
-        from space_dopesheet import dopesheet_filter
+        from bl_ui.space_dopesheet import dopesheet_filter
 
         layout = self.layout
 
@@ -245,14 +245,3 @@ class GRAPH_MT_key_transform(bpy.types.Menu):
         layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
         layout.operator("transform.rotate", text="Rotate")
         layout.operator("transform.resize", text="Scale")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 99%
rename from release/scripts/ui/space_image.py
rename to release/scripts/startup/bl_ui/space_image.py
index 46b164c..b2965d0 100644 (file)
@@ -751,14 +751,3 @@ class IMAGE_PT_paint_curve(BrushButtonsPanel, bpy.types.Panel):
         row.operator("brush.curve_preset", icon="SHARPCURVE", text="").shape = 'SHARP'
         row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE'
         row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX'
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 98%
rename from release/scripts/ui/space_info.py
rename to release/scripts/startup/bl_ui/space_info.py
index 2ec099d..be76cf7 100644 (file)
@@ -202,6 +202,7 @@ class INFO_MT_mesh_add(bpy.types.Menu):
         layout.separator()
         layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text="Grid")
         layout.operator("mesh.primitive_monkey_add", icon='MESH_MONKEY', text="Monkey")
+        layout.operator("mesh.primitive_torus_add", text="Torus", icon='MESH_TORUS')
 
 
 class INFO_MT_curve_add(bpy.types.Menu):
@@ -398,14 +399,3 @@ class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
         textblock.write('\n'.join(op_strings))
         self.report({'INFO'}, "See OperatorList.txt textblock")
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 94%
rename from release/scripts/ui/space_logic.py
rename to release/scripts/startup/bl_ui/space_logic.py
index 3c55853..6eb3337 100644 (file)
@@ -85,14 +85,3 @@ class LOGIC_MT_view(bpy.types.Menu):
         layout.column()
 
         layout.operator("logic.properties", icon='MENU_PANEL')
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 97%
rename from release/scripts/ui/space_nla.py
rename to release/scripts/startup/bl_ui/space_nla.py
index 7388a83..83d8464 100644 (file)
@@ -189,14 +189,3 @@ class NLA_MT_edit_transform(bpy.types.Menu):
         layout.operator("transform.translate", text="Grab/Move")
         layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
         layout.operator("transform.resize", text="Scale")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 97%
rename from release/scripts/ui/space_node.py
rename to release/scripts/startup/bl_ui/space_node.py
index 1076b13..7374b2c 100644 (file)
@@ -191,14 +191,3 @@ class NODE_PT_properties(bpy.types.Panel):
         col.prop(snode, "backdrop_x", text="X")
         col.prop(snode, "backdrop_y", text="Y")
         col.operator("node.backimage_move", text="Move")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 95%
rename from release/scripts/ui/space_outliner.py
rename to release/scripts/startup/bl_ui/space_outliner.py
index 4108e73..aca213c 100644 (file)
@@ -115,14 +115,3 @@ class OUTLINER_MT_edit_datablocks(bpy.types.Menu):
 
         col.operator("outliner.drivers_add_selected")
         col.operator("outliner.drivers_delete_selected")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 99%
rename from release/scripts/ui/space_sequencer.py
rename to release/scripts/startup/bl_ui/space_sequencer.py
index 872b64e..77ac18e 100644 (file)
@@ -799,14 +799,3 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output, bpy.types.Panel):
         if st.display_mode == 'WAVEFORM':
             col.prop(st, "show_separate_color")
         col.prop(st, "proxy_render_size")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 97%
rename from release/scripts/ui/space_text.py
rename to release/scripts/startup/bl_ui/space_text.py
index d1ccdf2..d21d695 100644 (file)
@@ -297,14 +297,3 @@ class TEXT_MT_toolbox(bpy.types.Menu):
         layout.separator()
 
         layout.operator("text.run_script")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 97%
rename from release/scripts/ui/space_time.py
rename to release/scripts/startup/bl_ui/space_time.py
index ba10c37..f3c2bed 100644 (file)
@@ -196,14 +196,3 @@ class TIME_MT_autokey(bpy.types.Menu):
 
         layout.prop_enum(tools, "auto_keying_mode", 'ADD_REPLACE_KEYS')
         layout.prop_enum(tools, "auto_keying_mode", 'REPLACE_KEYS')
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 96%
rename from release/scripts/ui/space_userpref.py
rename to release/scripts/startup/bl_ui/space_userpref.py
index 89f703d..c79caf7 100644 (file)
@@ -737,7 +737,7 @@ class USERPREF_PT_file(bpy.types.Panel):
         sub.active = paths.use_auto_save_temporary_files
         sub.prop(paths, "auto_save_time", text="Timer (mins)")
 
-from space_userpref_keymap import InputKeyMapPanel
+from bl_ui.space_userpref_keymap import InputKeyMapPanel
 
 
 class USERPREF_PT_input(InputKeyMapPanel):
@@ -1170,45 +1170,3 @@ class WM_OT_addon_expand(bpy.types.Operator):
         info = addon_utils.module_bl_info(mod)
         info["show_expanded"] = not info["show_expanded"]
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    WindowManager = bpy.types.WindowManager
-
-    WindowManager.addon_search = StringProperty(name="Search", description="Search within the selected filter")
-    WindowManager.addon_filter = EnumProperty(
-            items=[('All', "All", ""),
-                   ('Enabled', "Enabled", ""),
-                   ('Disabled', "Disabled", ""),
-                   ('3D View', "3D View", ""),
-                   ('Add Curve', "Add Curve", ""),
-                   ('Add Mesh', "Add Mesh", ""),
-                   ('Animation', "Animation", ""),
-                   ('Development', "Development", ""),
-                   ('Game Engine', "Game Engine", ""),
-                   ('Import-Export', "Import-Export", ""),
-                   ('Mesh', "Mesh", ""),
-                   ('Object', "Object", ""),
-                   ('Render', "Render", ""),
-                   ('Rigging', "Rigging", ""),
-                   ('System', "System", "")
-                   ],
-            name="Category",
-            description="Filter add-ons by category",
-            )
-
-    WindowManager.addon_support = EnumProperty(
-            items=[('OFFICIAL', "Official", ""),
-                   ('COMMUNITY', 'Community', ""),
-                  ],
-            name="Support",
-            description="Display support level", default={'OFFICIAL', 'COMMUNITY'}, options={'ENUM_FLAG'})
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -779,14 +779,3 @@ class WM_OT_keyconfig_remove(bpy.types.Operator):
         keyconfig = wm.keyconfigs.active
         wm.keyconfigs.remove(keyconfig)
         return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
similarity index 99%
rename from release/scripts/ui/space_view3d.py
rename to release/scripts/startup/bl_ui/space_view3d.py
index 751d54d..3170417 100644 (file)
@@ -177,6 +177,10 @@ class VIEW3D_MT_transform(bpy.types.Menu):
         layout.operator("object.origin_set", text="Origin to Geometry").type = 'ORIGIN_GEOMETRY'
         layout.operator("object.origin_set", text="Origin to 3D Cursor").type = 'ORIGIN_CURSOR'
 
+        if context.mode == 'OBJECT':
+            layout.operator("object.align")
+            layout.operator("object.randomize_transform")
+
 
 class VIEW3D_MT_mirror(bpy.types.Menu):
     bl_label = "Mirror"
@@ -250,6 +254,14 @@ class VIEW3D_MT_uv_map(bpy.types.Menu):
 
         layout.operator("uv.reset")
 
+        layout.separator()
+
+        # python scripts
+        layout.operator_context = 'INVOKE_REGION_WIN'
+        layout.operator("uv.smart_project")
+        layout.operator("uv.lightmap_pack")
+        layout.operator("uv.follow_active_quads")
+
 # ********** View menus **********
 
 
@@ -2301,14 +2313,3 @@ class VIEW3D_PT_context_properties(bpy.types.Panel):
         if member:
             # Draw with no edit button
             rna_prop_ui.draw(self.layout, context, member, object, False)
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
@@ -1310,14 +1310,3 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, bpy.types.Panel):
             sub = col.row()
             sub.active = pe.use_fade_time
             sub.prop(pe, "fade_frames", slider=True)
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()