diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 15:53:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-02 15:53:48 +0400 |
commit | 3148c0f203ba23bead40e4e037bcc9a1eb27278b (patch) | |
tree | 1e91d053095e10a4b7afa1c392bb7525d3967cbe /io_import_scene_unreal_psk.py | |
parent | d566152b0372d1d29578c3353f6a4d5ff3af4d63 (diff) |
update addons to work with new register/unregister method,
These scritps still need changes related to parent classes
- mesh_surface_sketch.py
- render_renderfarmfi.py
- space_view3d_align_tools.py
- object_cloud_gen.py
Diffstat (limited to 'io_import_scene_unreal_psk.py')
-rw-r--r-- | io_import_scene_unreal_psk.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/io_import_scene_unreal_psk.py b/io_import_scene_unreal_psk.py index 50cb4bdd..584622e2 100644 --- a/io_import_scene_unreal_psk.py +++ b/io_import_scene_unreal_psk.py @@ -557,7 +557,7 @@ def getInputFilename(filename): print (" Selected file = ",filename) raise (IOError, "The selected input file is not a *.psk file") pskimport(filename) - + from bpy.props import * class IMPORT_OT_psk(bpy.types.Operator): @@ -577,19 +577,20 @@ class IMPORT_OT_psk(bpy.types.Operator): wm = context.manager wm.add_fileselect(self) return {'RUNNING_MODAL'} - -menu_func = lambda self, context: self.layout.operator(IMPORT_OT_psk.bl_idname, text="Skeleton Mesh (.psk)") + +def menu_func(self, context): + self.layout.operator(IMPORT_OT_psk.bl_idname, text="Skeleton Mesh (.psk)") + def register(): - bpy.types.register(IMPORT_OT_psk) bpy.types.INFO_MT_file_import.append(menu_func) def unregister(): - bpy.types.unregister(IMPORT_OT_psk) bpy.types.INFO_MT_file_import.remove(menu_func) if __name__ == "__main__": register() + #note this only read the data and will not be place in the scene #getInputFilename('C:\\blenderfiles\\BotA.psk') #getInputFilename('C:\\blenderfiles\\AA.PSK') |