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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-13 10:45:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-13 10:45:33 +0400
commitf662c0de0521d01ff546d46d5e9fb8a0f64c1c95 (patch)
tree647f2422c42edabadd8ab5dc0a7dcc766f8f4908 /release/scripts/io/export_ply.py
parentbf52b68dcd1864fd35309f9aae19f146da5b774e (diff)
exporters now set the filepath in the invoke() method rather then the menu drawing function.
Diffstat (limited to 'release/scripts/io/export_ply.py')
-rw-r--r--release/scripts/io/export_ply.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/release/scripts/io/export_ply.py b/release/scripts/io/export_ply.py
index f4d7cae75a3..7ea3c72a662 100644
--- a/release/scripts/io/export_ply.py
+++ b/release/scripts/io/export_ply.py
@@ -293,8 +293,11 @@ class ExportPLY(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] + ".ply"
+
+ context.manager.add_fileselect(self)
return {'RUNNING_MODAL'}
def draw(self, context):
@@ -310,9 +313,7 @@ class ExportPLY(bpy.types.Operator):
def menu_func(self, context):
- import os
- default_path = os.path.splitext(bpy.data.filepath)[0] + ".ply"
- self.layout.operator(ExportPLY.bl_idname, text="Stanford (.ply)").filepath = default_path
+ self.layout.operator(ExportPLY.bl_idname, text="Stanford (.ply)")
def register():