Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-02 15:53:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-02 15:53:48 +0400
commit3148c0f203ba23bead40e4e037bcc9a1eb27278b (patch)
tree1e91d053095e10a4b7afa1c392bb7525d3967cbe /io_export_unreal_psk_psa.py
parentd566152b0372d1d29578c3353f6a4d5ff3af4d63 (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_export_unreal_psk_psa.py')
-rw-r--r--io_export_unreal_psk_psa.py29
1 files changed, 10 insertions, 19 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 4434ad25..58f473c8 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -89,7 +89,6 @@ import operator
from struct import pack, calcsize
-MENUPANELBOOL = True
# REFERENCE MATERIAL JUST IN CASE:
#
@@ -1506,13 +1505,7 @@ class ExportUDKAnimData(bpy.types.Operator):
wm = context.manager
wm.add_fileselect(self)
return {'RUNNING_MODAL'}
-
-def menu_func(self, context):
- bpy.context.scene.unrealexportpsk = True
- bpy.context.scene.unrealexportpsa = True
- default_path = os.path.splitext(bpy.data.filepath)[0] + ".psk"
- self.layout.operator("export.udk_anim_data", text="Skeleton Mesh / Animation Data (.psk/.psa)").filepath = default_path
-
+
class VIEW3D_PT_unrealtools_objectmode(bpy.types.Panel):
bl_space_type = "VIEW_3D"
@@ -1582,21 +1575,19 @@ class OBJECT_OT_UnrealExport(bpy.types.Operator):
#self.report({'WARNING', 'INFO'}, exportmessage)
self.report({'INFO'}, exportmessage)
return{'FINISHED'}
-
+
+
+def menu_func(self, context):
+ bpy.context.scene.unrealexportpsk = True
+ bpy.context.scene.unrealexportpsa = True
+ default_path = os.path.splitext(bpy.data.filepath)[0] + ".psk"
+ self.layout.operator("export.udk_anim_data", text="Skeleton Mesh / Animation Data (.psk/.psa)").filepath = default_path
+
+
def register():
- global MENUPANELBOOL
- if MENUPANELBOOL:
- bpy.types.register(OBJECT_OT_UnrealExport)
- bpy.types.register(VIEW3D_PT_unrealtools_objectmode)
- bpy.types.register(ExportUDKAnimData)
bpy.types.INFO_MT_file_export.append(menu_func)
def unregister():
- global MENUPANELBOOL
- if MENUPANELBOOL:
- bpy.types.unregister(OBJECT_OT_UnrealExport)
- bpy.types.unregister(VIEW3D_PT_unrealtools_objectmode)
- bpy.types.unregister(ExportUDKAnimData)
bpy.types.INFO_MT_file_export.remove(menu_func)
if __name__ == "__main__":