diff options
author | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2020-10-10 11:16:31 +0300 |
---|---|---|
committer | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2020-10-10 11:16:31 +0300 |
commit | bf3c9f5901014fcc6b064bd2b516c179b2eee38c (patch) | |
tree | 978b6aa4354169eb2d2df3b96e1383479706deee /io_coat3D/__init__.py | |
parent | 77aada8057d961a3b409d7cdcfad312919b40d23 (diff) |
io_coat3D: fix error when reading exchange_folder
Diffstat (limited to 'io_coat3D/__init__.py')
-rw-r--r-- | io_coat3D/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py index 5eb64008..7f23801a 100644 --- a/io_coat3D/__init__.py +++ b/io_coat3D/__init__.py @@ -120,8 +120,7 @@ def set_exchange_folder(): if(not(os.path.isdir(applink_folder))): os.makedirs(applink_folder) - if(os.path.isfile(exchange_path) == False): - + if(os.path.isfile(exchange_path) == False or os.path.getsize(exchange_path) == 0): file = open(exchange_path, "w") file.write("%s"%(exchange_path)) file.close() @@ -1138,7 +1137,8 @@ def blender_3DC_blender(texturelist, file_applink_address): objekti.select_set(False) if(coat3D.remove_path == True): - os.remove(path3b_n) + if(os.path.isfile(path3b_n)): + os.remove(path3b_n) coat3D.remove_path = False bpy.ops.object.select_all(action='DESELECT') |