Skip to content

Commit

Permalink
Add filepath argument to export funcs such that the base class actual…
Browse files Browse the repository at this point in the history
…ly makes sense
  • Loading branch information
Pherakki committed Dec 6, 2020
1 parent da90208 commit 48d1676
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions BlenderIO/Export.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ def export_file(self, context, filepath, platform):
bpy.ops.object.transform_apply(rotation=True)
parent_obj.select_set(False)

def execute_func(self, context, platform):
filepath, file_extension = os.path.splitext(self.filepath)
def execute_func(self, context, filepath, platform):
filepath, file_extension = os.path.splitext(filepath)
assert any([file_extension == ext for ext in
('.name', '.skel', '.geom')]), f"Extension is {file_extension}: Not a name, skel or geom file!"
self.export_file(context, filepath, platform)
Expand All @@ -272,14 +272,14 @@ class ExportDSCSPC(ExportDSCSBase, bpy.types.Operator, ExportHelper):
bl_idname = 'export_file.export_dscs_pc'

def execute(self, context):
return super().execute_func(context, 'PC')
return super().execute_func(context, self.filepath, 'PC')


class ExportDSCSPS4(ExportDSCSBase, bpy.types.Operator, ExportHelper):
bl_idname = 'export_file.export_dscs_ps4'

def execute(self, context):
return super().execute_func(context, 'PS4')
return super().execute_func(context, self.filepath, 'PS4')

# UV help from:
# https://blender.stackexchange.com/questions/49341/how-to-get-the-uv-corresponding-to-a-vertex-via-the-python-api
Expand Down

0 comments on commit 48d1676

Please sign in to comment.