textures["normal_map"] = s.texture
if material.technique:
- if not obj.inherit_tech:
- return []
+ if not material.inherit_tech:
+ return tech_res
if self.single_file:
raise Exception("Can't export inherited technique to a single file")
material = l.material_slots[0].material
if material:
if material.material_map:
- tech_res = resources["material_map_{}.tech".format(material.technique)]
+ tech_res = resources["material_map_{}.tech".format(os.path.splitext(material.technique)[0])]
else:
tech_res = resources[material.name+".tech"]
else:
+import os
+
class MaterialMap:
def __init__(self, materials):
self.technique = materials[0].technique
- self.name = "material_map_"+self.technique
+ if self.technique:
+ self.name = "material_map_"+os.path.splitext(self.technique)[0]
+ else:
+ self.name = "material_map"
self.materials = materials
self.srgb_colors = materials[0].srgb_colors
for m in self.materials: