Browse Source

Ensure the default export file's extension is .age

pull/48/head
Adam Johnson 8 years ago
parent
commit
e991c4d134
  1. 6
      korman/operators/op_export.py

6
korman/operators/op_export.py

@ -49,6 +49,7 @@ class ExportOperator(bpy.types.Operator):
# This wigs out and very bad things happen if it's not directly on the operator...
filepath = StringProperty(subtype="FILE_PATH")
filter_glob = StringProperty(default="*.age", options={'HIDDEN'})
def draw(self, context):
layout = self.layout
@ -116,6 +117,11 @@ class ExportOperator(bpy.types.Operator):
def invoke(self, context, event):
# Called when a user hits "export" from the menu
# We will prompt them for the export info, then call execute()
if not self.filepath:
blend_filepath = context.blend_data.filepath
if not blend_filepath:
blend_filepath = "Korman"
self.filepath = str(Path(blend_filepath).with_suffix(".age"))
context.window_manager.fileselect_add(self)
return {"RUNNING_MODAL"}

Loading…
Cancel
Save