diff options
Diffstat (limited to 'release/scripts/io/export_x3d.py')
-rw-r--r-- | release/scripts/io/export_x3d.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/release/scripts/io/export_x3d.py b/release/scripts/io/export_x3d.py index 607f38be6f7..0d9c3efaec5 100644 --- a/release/scripts/io/export_x3d.py +++ b/release/scripts/io/export_x3d.py @@ -1205,14 +1205,16 @@ class ExportX3D(bpy.types.Operator): return {'FINISHED'} def invoke(self, context, event): - wm = context.manager - wm.add_fileselect(self) + import os + if not self.properties.is_property_set("filepath"): + self.properties.filepath = os.path.splitext(bpy.data.filepath)[0] + ".x3d" + + context.manager.add_fileselect(self) return {'RUNNING_MODAL'} def menu_func(self, context): - default_path = os.path.splitext(bpy.data.filepath)[0] + ".x3d" - self.layout.operator(ExportX3D.bl_idname, text="X3D Extensible 3D (.x3d)").filepath = default_path + self.layout.operator(ExportX3D.bl_idname, text="X3D Extensible 3D (.x3d)") def register(): |