deltanedas %!s(int64=3) %!d(string=hai) anos
pai
achega
164c6887ce
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      chair_exporter.py

+ 6 - 2
chair_exporter.py

@@ -11,7 +11,7 @@ bl_info = {
 	"blender": (3, 0, 0),
 	"location": "File > Export > Chair Mesh (.chr)",
 	# Crate verion 0.2.3
-	"version": (0, 2, 6),
+	"version": (0, 2, 7),
 	"category": "Import-Export"
 }
 
@@ -104,7 +104,11 @@ def process_scene(cfg, context):
 		if cfg.export_uvs:
 			# get texture name from custom property or use the material name
 			mat = obj.active_material
-			texture = mat["chair_texture"] or mat.name
+			if "chair_texutre" in mat:
+				texture = mat["chair_texture"]
+			else:
+				texture = mat.name
+
 			if texture in texture_ids:
 				texturei = texture_ids[texture]
 			else: