[Bf-extensions-cvs] [35eabf6b] blender2.8: fix double click bug

Kalle-Samuli Riihikoski noreply at git.blender.org
Sat Dec 15 22:04:16 CET 2018


Commit: 35eabf6bc319dd4447bc114a8d5adff4b6027ea2
Author: Kalle-Samuli Riihikoski
Date:   Sat Dec 15 23:00:46 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBA35eabf6bc319dd4447bc114a8d5adff4b6027ea2

fix double click bug

===================================================================

M	io_coat3D/__init__.py
M	io_coat3D/tex.py

===================================================================

diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index 214f3b20..7c16e22a 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -618,6 +618,12 @@ class SCENE_OT_import(bpy.types.Operator):
                                     obj_proxy.coat3D.delete_proxy_mesh = True
                                     found_obj = True
 
+                        mat_list = []
+                        if (objekti.material_slots):
+                            act_mat = objekti.active_material
+                            for obj_mat in objekti.material_slots:
+                                mat_list.append(obj_mat.material)
+
                         if(found_obj == True):
                             exportfile = coat3D.exchangedir
                             path3b_n = coat3D.exchangedir
@@ -638,11 +644,8 @@ class SCENE_OT_import(bpy.types.Operator):
                                 export_file.close()
                                 coat3D.remove_path = True
 
-                            mat_list = []
-                            if(objekti.material_slots):
-                                act_mat = objekti.active_material
-                                for obj_mat in objekti.material_slots:
-                                    mat_list.append(obj_mat.material)
+
+
                             bpy.ops.object.select_all(action='DESELECT')
                             obj_proxy.select_set(True)
 
@@ -699,13 +702,13 @@ class SCENE_OT_import(bpy.types.Operator):
                                 coat3D.importmesh = False
 
                             objekti.select_set(True)
-                            if(coat3D.importtextures):
-                                is_new = False
-                                tex.matlab(objekti,mat_list,texturelist,is_new)
-                            objekti.select_set(False)
+                        if(coat3D.importtextures):
+                            is_new = False
+                            tex.matlab(objekti,mat_list,texturelist,is_new)
+                        objekti.select_set(False)
                     else:
+                        print('JAAKO TAHAN KOHTAAN 2')
                         mat_list = []
-
                         if (objekti.material_slots):
                             for obj_mat in objekti.material_slots:
                                 mat_list.append(obj_mat.material)
diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py
index ffc6c6dc..7af4d68e 100644
--- a/io_coat3D/tex.py
+++ b/io_coat3D/tex.py
@@ -85,7 +85,6 @@ def readtexturefolder(objekti, mat_list, texturelist, is_new): #read textures fr
                 if texture_info[2].startswith('displacement'):
                     texcoat['displacement'].append(texture_info[3])
                     create_nodes = True
-
         if(create_nodes):
             coat3D = bpy.context.scene.coat3D
             path3b_n = coat3D.exchangedir
@@ -137,7 +136,7 @@ def createnodes(active_mat,texcoat): # Cretes new nodes and link textures into t
             applink_tree = node
             break
 
-
+    print('TeXture UPDATE happens')
     for node in act_material.nodes:
         if(node.type == 'TEX_IMAGE'):
             if(node.name == '3DC_color'):



More information about the Bf-extensions-cvs mailing list