diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-14 15:59:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-14 15:59:08 +0400 |
commit | 475c45e4b1c3052885c222bd42afd4d78343b74a (patch) | |
tree | c848b5b644796ccbedd2e06b1b911d3bccac5719 /io_export_unreal_psk_psa.py | |
parent | d20a38c4069ff1896b20eb3cef83cfab77e862ca (diff) |
bugfix [#22843] Cannot export to folder with ".blend" on the end.
Diffstat (limited to 'io_export_unreal_psk_psa.py')
-rw-r--r-- | io_export_unreal_psk_psa.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py index 81cdcf02..a49ad521 100644 --- a/io_export_unreal_psk_psa.py +++ b/io_export_unreal_psk_psa.py @@ -1510,7 +1510,7 @@ class ExportUDKAnimData(bpy.types.Operator): def menu_func(self, context): bpy.context.scene.unrealexportpsk = True bpy.context.scene.unrealexportpsa = True - default_path = bpy.data.filepath.replace(".blend", ".psk") + 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 @@ -1521,7 +1521,7 @@ class VIEW3D_PT_unrealtools_objectmode(bpy.types.Panel): def poll(self, context): return context.active_object - + def draw(self, context): layout = self.layout #layout.label(text="Unreal Tools") @@ -1575,8 +1575,8 @@ class OBJECT_OT_UnrealExport(bpy.types.Operator): bpy.context.scene.unrealexportpsk = True bpy.context.scene.unrealexportpsa = True print("Exporting ALL...") - default_path = bpy.data.filepath.replace(".blend", ".psk") - print(dir(bpy.data.filepath)) + + default_path = os.path.splitext(bpy.data.filepath)[0] + ".psk" fs_callback(default_path, bpy.context, False) #self.report({'WARNING', 'INFO'}, exportmessage) @@ -1590,7 +1590,7 @@ def register(): 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: |