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:
authorKalle-Samuli Riihikoski <haikalle@gmail.com>2018-11-13 16:31:16 +0300
committerKalle-Samuli Riihikoski <haikalle@gmail.com>2018-11-13 16:31:16 +0300
commitea543c741c57d2840ab08debf70fd1a5c45d1f8d (patch)
tree23444b95658badcfec01e773ef5c9492ac621a25 /io_coat3D
parentf1f99ebdea7ae24d0e77305882bdd0a790311588 (diff)
Now all objects include .3b path
Diffstat (limited to 'io_coat3D')
-rw-r--r--io_coat3D/__init__.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index acb107fc..af192142 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -596,12 +596,14 @@ class SCENE_OT_import(bpy.types.Operator):
coat['active_coat'] = line
export_file.close()
os.remove(exportfile)
+ remove_path = False
if(os.path.isfile(path3b_n)):
export_file = open(path3b_n)
for line in export_file:
objekti.coat3D.applink_3b_path = line
export_file.close()
- os.remove(path3b_n)
+ remove_path = True
+
obj_names = objekti.coat3D.applink_group
@@ -651,18 +653,8 @@ class SCENE_OT_import(bpy.types.Operator):
for data_mesh in objekti.data.polygons:
data_mesh.use_smooth = False
-
bpy.ops.object.select_all(action='DESELECT')
- if(os.path.isfile(path3b_n)):
- path3b_fil = open(path3b_n)
- for lin in path3b_fil:
- objekti.coat3D.applink_3b_path = lin
- head, tail = os.path.split(objekti.coat3D.applink_3b_path)
- objekti.coat3D.applink_3b_just_name = tail
- path3b_fil.close()
- os.remove(path3b_n)
-
if(coat3D.importmesh and not(os.path.isfile(objekti.coat3D.applink_address))):
coat3D.importmesh = False
@@ -686,6 +678,8 @@ class SCENE_OT_import(bpy.types.Operator):
tex.matlab(objekti,mat_list,texturelist, is_new)
objekti.select_set(False)
+ if(remove_path == True):
+ os.remove(path3b_n)
bpy.ops.object.select_all(action='DESELECT')
if(import_list):