[SUBMIT ON MAIN BRANCH] Blender script fix: Export texture names correctly

coolant-mod
immibis 2020-02-02 12:03:11 +01:00
parent 0662424055
commit 9d7fb57067
1 changed files with 2 additions and 2 deletions

View File

@ -388,9 +388,9 @@ def append_obj_to_colobot_model(obj, model, scene, defaults):
t.mat.specular[3] = mat.specular_alpha
if (mat.texture_slots[0] != None):
t.tex1 = bpy.path.basename(mat.texture_slots[0].texture.image.filepath)
t.mat.tex1 = bpy.path.basename(mat.texture_slots[0].texture.image.filepath)
if (mat.texture_slots[1] != None):
t.tex2 = bpy.path.basename(mat.texture_slots[1].texture.image.filepath)
t.mat.tex2 = bpy.path.basename(mat.texture_slots[1].texture.image.filepath)
t.var_tex2 = mat.get('var_tex2', defaults['var_tex2'])
t.state = mat.get('state', defaults['state'])