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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-03-18 17:01:04 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-03-18 17:01:04 +0400
commit6c32300be8cc8d48a3e02055dc43bea2ab98a525 (patch)
tree59541ff94cdee03300663f49a34fff4e7b4bb303 /io_online_sketchfab/__init__.py
parent8ad356e3324cddef42d41f9b9b588ef1ebd2f8bf (diff)
Backport revisions for the final 2.70 releasev2.70
8b0864a
Diffstat (limited to 'io_online_sketchfab/__init__.py')
-rw-r--r--io_online_sketchfab/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/io_online_sketchfab/__init__.py b/io_online_sketchfab/__init__.py
index 3e5d7472..b39f4f7f 100644
--- a/io_online_sketchfab/__init__.py
+++ b/io_online_sketchfab/__init__.py
@@ -47,6 +47,7 @@ else:
import bpy
import os
+import tempfile
import threading
import subprocess
@@ -244,7 +245,8 @@ class ExportSketchfab(bpy.types.Operator):
basename = os.path.join(basename, "temp")
if not ext:
ext = ".blend"
- filepath = basename + "-export-sketchfab" + ext
+ tempdir = tempfile.mkdtemp()
+ filepath = os.path.join(tempdir, "export-sketchfab" + ext)
try:
# save a copy of actual scene but don't interfere with the users models
@@ -262,6 +264,7 @@ class ExportSketchfab(bpy.types.Operator):
"-noaudio",
filepath,
"--python", os.path.join(script_path, "pack_for_export.py"),
+ "--", tempdir
])
os.remove(filepath)
@@ -434,6 +437,7 @@ class SketchfabEmailToken(bpy.types.Operator):
# remove file copy
def terminate(filepath):
os.remove(filepath)
+ os.rmdir(os.path.dirname(filepath))
# registration
classes = (