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-06 05:40:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-06 05:40:54 +0400
commit30d180ff0d18217ed860afb3f63a38d536b41790 (patch)
tree9602181a42d3ce2a50d25e4ce84be5cb6b42e313 /release/scripts/io/export_ply.py
parent46d88bb8037f58220aae2397cb893ff1726aa94f (diff)
bugfix [#23194] export UVs miss the extension file
also made all other exporters do this. Made some internal changes. - moved path functions from bpy.utils to bpy.path (similar to os.path) - added functions... bpy.path.ensure_ext(path, ".ext", case_sensitive=False) # simple function to ensure the extension is set. bpy.path.resolve_ncase(path) # useful for importing scenes made on windows where the path case doesnt match the files.
Diffstat (limited to 'release/scripts/io/export_ply.py')
-rw-r--r--release/scripts/io/export_ply.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/release/scripts/io/export_ply.py b/release/scripts/io/export_ply.py
index c92a0690de4..aacfa6d07b2 100644
--- a/release/scripts/io/export_ply.py
+++ b/release/scripts/io/export_ply.py
@@ -280,12 +280,10 @@ class ExportPLY(bpy.types.Operator):
return context.active_object != None
def execute(self, context):
- # print("Selected: " + context.active_object.name)
+ filepath = self.properties.filepath
+ filepath = bpy.path.ensure_ext(filepath, ".ply")
- if not self.properties.filepath:
- raise Exception("filename not set")
-
- write(self.properties.filepath, context.scene, context.active_object,\
+ write(filepath, context.scene, context.active_object,\
EXPORT_APPLY_MODIFIERS=self.properties.use_modifiers,
EXPORT_NORMALS=self.properties.use_normals,
EXPORT_UV=self.properties.use_uvs,