[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1574] trunk/py/scripts/addons/ io_export_anim_mesh_xna/__init__.py: disable lazy operator intializing, on registering and addon its best the operators it provides become immediately available rather then only when the menu item is drawn .
Campbell Barton
ideasman42 at gmail.com
Fri Feb 11 04:00:59 CET 2011
Revision: 1574
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1574
Author: campbellbarton
Date: 2011-02-11 03:00:59 +0000 (Fri, 11 Feb 2011)
Log Message:
-----------
disable lazy operator intializing, on registering and addon its best the operators it provides become immediately available rather then only when the menu item is drawn.
Modified Paths:
--------------
trunk/py/scripts/addons/io_export_anim_mesh_xna/__init__.py
Modified: trunk/py/scripts/addons/io_export_anim_mesh_xna/__init__.py
===================================================================
--- trunk/py/scripts/addons/io_export_anim_mesh_xna/__init__.py 2011-02-11 02:57:30 UTC (rev 1573)
+++ trunk/py/scripts/addons/io_export_anim_mesh_xna/__init__.py 2011-02-11 03:00:59 UTC (rev 1574)
@@ -54,10 +54,7 @@
self.layout.operator(export_xna.ExportFBXmodel.bl_idname, text="XNA FBX Model only (.fbx)").filepath = default_path
def menu_export_fbx_takes(self, context):
- from . import export_xna
import os
- if not export_xna.ExportFBXtakes.is_registered():
- bpy.utils.register_module(__name__)
# get the current action name
currentAction = ""
@@ -71,10 +68,7 @@
self.layout.operator(export_xna.ExportFBXtakes.bl_idname, text="XNA FBX Animations only (.fbx)").filepath = default_path
def menu_export_fbx_animated(self, context):
- from . import export_xna
import os
- if not export_xna.ExportFBXanimated.is_registered():
- bpy.utils.register_module(__name__)
default_path = os.path.splitext(bpy.data.filepath)[0] + ".fbx"
self.layout.operator(export_xna.ExportFBXanimated.bl_idname, text="XNA FBX Animated Model (.fbx)").filepath = default_path
@@ -82,6 +76,9 @@
# Add references to all scripts invoked by this class
def register():
+ from . import export_xna
+ bpy.utils.register_module(__name__)
+
bpy.types.INFO_MT_file_export.append(menu_export_fbx_animated)
bpy.types.INFO_MT_file_export.append(menu_export_fbx_model)
bpy.types.INFO_MT_file_export.append(menu_export_fbx_takes)
More information about the Bf-extensions-cvs
mailing list