From 21b1cc0648b53f74496af37de6ecaa9ba0f1c914 Mon Sep 17 00:00:00 2001
From: Kalle-Samuli Riihikoski <haikalle@gmail.com>
Date: Tue, 4 Sep 2018 17:56:24 +0300
Subject: [PATCH] Fixing vertex groups bug. Also node locate update.

---
 io_coat3D/__init__.py | 2 +-
 io_coat3D/tex.py      | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index 5813d730b..15b9759b9 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -188,7 +188,7 @@ def updatemesh(objekti, proxy):
 
     #TO DO VERTEX GROUPS, gives an error with this code.
 
-    if(objekti.vertex_groups.keys != []):
+    if(objekti.vertex_groups.keys() != []):
         bpy.ops.object.select_all(action='DESELECT')
         proxy.select_set('SELECT')
         objekti.select_set('SELECT')
diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py
index b6ea441ea..733d84716 100644
--- a/io_coat3D/tex.py
+++ b/io_coat3D/tex.py
@@ -114,7 +114,7 @@ def createnodes(objekti,texcoat): #luo nodes palikat ja linkittaa tekstuurit nii
         #Metalness
         if(bring_metalness == True and glue_mat.inputs.find('Metallic') != -1 and texcoat['metalness'] != []):
             node = act_material.node_tree.nodes.new('ShaderNodeTexImage')
-            node.location = -600,200
+            node.location = -830,160
             node.name='3DC_metalness'
             if(texcoat['metalness']):
                 node.image = bpy.data.images.load(texcoat['metalness'][0])
@@ -137,8 +137,8 @@ def createnodes(objekti,texcoat): #luo nodes palikat ja linkittaa tekstuurit nii
         if(bring_normal == True and glue_mat.inputs.find('Normal') != -1 and texcoat['nmap'] != []):
             node = act_material.node_tree.nodes.new('ShaderNodeTexImage')
             normal_node = act_material.node_tree.nodes.new('ShaderNodeNormalMap')
-            node.location = -600,-270
-            normal_node.location = -300,-170
+            node.location = -600,-370
+            normal_node.location = -300,-270
             node.name='3DC_normal'
             if(texcoat['nmap']):
                 node.image = bpy.data.images.load(texcoat['nmap'][0])
-- 
GitLab