[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2297] trunk/py/scripts/addons/ io_coat3D/tex.py: Fixed an error.
Kalle-Samuli Riihikoski
haikalle at gmail.com
Sat Sep 3 15:54:20 CEST 2011
Revision: 2297
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2297
Author: haikalle
Date: 2011-09-03 13:54:19 +0000 (Sat, 03 Sep 2011)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/py/scripts/addons/io_coat3D/tex.py
Modified: trunk/py/scripts/addons/io_coat3D/tex.py
===================================================================
--- trunk/py/scripts/addons/io_coat3D/tex.py 2011-09-03 11:31:10 UTC (rev 2296)
+++ trunk/py/scripts/addons/io_coat3D/tex.py 2011-09-03 13:54:19 UTC (rev 2297)
@@ -199,10 +199,12 @@
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 @@
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 @@
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 @@
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'
More information about the Bf-extensions-cvs
mailing list