diff options
author | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2011-09-03 17:54:19 +0400 |
---|---|---|
committer | Kalle-Samuli Riihikoski <haikalle@gmail.com> | 2011-09-03 17:54:19 +0400 |
commit | cb43d89a378797e1a4a277198258678126061688 (patch) | |
tree | 02c2e652a26fd0d3d2a6bfa4d81712367578be1d /io_coat3D/tex.py | |
parent | a09b0fea14bf6aa8d03cd32ef8d354dda9bed2e8 (diff) |
Fixed an error. It was asking image.filepath even if there was no image. Now make sure that image is always assing it before this call.
Diffstat (limited to 'io_coat3D/tex.py')
-rw-r--r-- | io_coat3D/tex.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py index 748d1aa0..d3b5f56d 100644 --- a/io_coat3D/tex.py +++ b/io_coat3D/tex.py @@ -199,10 +199,12 @@ def gettex(mat_list, objekti, scene,export): elif(useold != ''): objekti.active_material.texture_slots[index].texture = useold + objekti.active_material.texture_slots[index].texture.image = bpy.data.images[useold.name] objekti.active_material.texture_slots[index].texture.image.filepath = texcoat['color'][0] if(objekti.data.uv_textures.active): objekti.active_material.texture_slots[index].texture_coords = 'UV' objekti.active_material.texture_slots[index].uv_layer = objekti.data.uv_textures.active.name + if(bring_normal == 1 and texcoat['nmap']): name_tex ='Normal_' @@ -264,6 +266,7 @@ def gettex(mat_list, objekti, scene,export): elif(useold != ''): objekti.active_material.texture_slots[index].texture = useold + objekti.active_material.texture_slots[index].texture.image = bpy.data.images[useold.name] objekti.active_material.texture_slots[index].texture.image.filepath = texcoat['nmap'][0] if(objekti.data.uv_textures.active): objekti.active_material.texture_slots[index].texture_coords = 'UV' @@ -323,6 +326,7 @@ def gettex(mat_list, objekti, scene,export): elif(useold != ''): objekti.active_material.texture_slots[index].texture = useold + objekti.active_material.texture_slots[index].texture.image = bpy.data.images[useold.name] objekti.active_material.texture_slots[index].texture.image.filepath = texcoat['specular'][0] if(objekti.data.uv_textures.active): objekti.active_material.texture_slots[index].texture_coords = 'UV' @@ -381,6 +385,7 @@ def gettex(mat_list, objekti, scene,export): elif(useold != ''): objekti.active_material.texture_slots[index].texture = useold + objekti.active_material.texture_slots[index].texture.image = bpy.data.images[useold.name] objekti.active_material.texture_slots[index].texture.image.filepath = texcoat['disp'][0] if(objekti.data.uv_textures.active): objekti.active_material.texture_slots[index].texture_coords = 'UV' |