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:
Diffstat (limited to 'io_coat3D/__init__.py')
-rw-r--r--io_coat3D/__init__.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index a5f28246..d766ffc7 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -45,6 +45,7 @@ import ntpath
import re
import shutil
import pathlib
+import stat
import time
@@ -266,8 +267,15 @@ class SCENE_OT_folder(bpy.types.Operator):
coat3D = bpy.context.scene.coat3D
if(os.path.isdir(coat3D.exchangeFolder)):
foundExchangeFolder= True
- else:
- foundExchangeFolder = False
+ if(platform == 'win32' or platform == 'darwin'):
+ exchangeFile = os.path.expanduser("~") + os.sep + 'Documents' + os.sep + '3DC2Blender' + os.sep + '3DC2Blender'
+ else:
+ exchangeFile = os.path.expanduser("~") + os.sep + '3DC2Blender' + os.sep + '3DC2Blender'
+
+ if(coat3D.exchangeFolder.rfind('Exchange') >= 0):
+ file = open(exchangeFile, 'w')
+ file.write(coat3D.exchangeFolder)
+ file.close()
return {'FINISHED'}