for p in textured_props:
ctx.next_slice(p.texture.image)
- tex_name = p.texture.image.name+".tex"
+ tex_name = texture_export.get_texture_name(p.texture, p.tex_channels)
if tex_name not in resources:
resources[tex_name] = texture_export.export_texture(p.texture, p.tex_channels)
def create_property_statement(self, mat_res, prop, resources):
from .datafile import Statement
if prop.texture:
- tex_res = resources[prop.texture.image.name+".tex"]
+ from .export_texture import TextureExporter
+ texture_export = TextureExporter()
+ tex_res = resources[texture_export.get_texture_name(prop.texture, prop.tex_channels)]
return mat_res.create_reference_statement(prop.tex_keyword, tex_res)
elif not prop.keyword:
return