diff options
author | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2020-10-12 18:18:31 +0300 |
---|---|---|
committer | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2020-10-12 18:18:31 +0300 |
commit | 5a1c2a38bb99c779fe27cdc8fbcddec888717ae6 (patch) | |
tree | 3cd7fd3eed87e329d4d477f44adc719e3746ec27 /io_coat3D/folders.py | |
parent | 9a47984628de7e89c8a9985fd661bfee78ca11c0 (diff) |
io_coat3D:fixing folder bug
Diffstat (limited to 'io_coat3D/folders.py')
-rw-r--r-- | io_coat3D/folders.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/io_coat3D/folders.py b/io_coat3D/folders.py index f4637d3c..ec6b62e5 100644 --- a/io_coat3D/folders.py +++ b/io_coat3D/folders.py @@ -3,14 +3,16 @@ import os def InitFolders(): + + + platform = os.sys.platform + coat3D = bpy.context.scene.coat3D + # Global variable foundExchangeFolder (True / False) guides these steps # 1. Read Exchange_folder.txt, it not success -> # 2. Try to find exchange folder from system hard drive, if not success --> # 3. Leave foundExchangeFolder = False - platform = os.sys.platform - coat3D = bpy.context.scene.coat3D - # 1. ################################################################# if(platform == 'win32' or platform == 'darwin'): @@ -29,6 +31,9 @@ def InitFolders(): if(os.path.isdir(os.path.abspath(folderPath)) and folderPath.rfind('Exchange') >= 0): coat3D.exchangeFolder = folderPath return True, coat3D.exchangeFolder + else: + os.makedirs(os.path.dirname(exchangeFile)) + # 2. ################################################################# |