|
@@ -342,9 +342,9 @@ def faces(mesh, options, material_list=None):
|
|
|
face_data.append(mat_index)
|
|
|
break
|
|
|
else:
|
|
|
- error = ("Could not map the material index "
|
|
|
+ logger.warning("Could not map the material index "
|
|
|
"for face %d" % face.index)
|
|
|
- raise exceptions.MaterialError(error)
|
|
|
+ face_data.append(0) # default to index zero if there's a bad material
|
|
|
|
|
|
if uv_indices:
|
|
|
for index, uv_layer in enumerate(uv_indices):
|
|
@@ -465,6 +465,11 @@ def animated_blend_shapes(mesh, name, options):
|
|
|
:param options:
|
|
|
|
|
|
"""
|
|
|
+
|
|
|
+ # let filter the name to only keep the node's name
|
|
|
+ # the two cases are '%sGeometry' and '%sGeometry.%d', and we want %s
|
|
|
+ name = re.search("^(.*)Geometry(\..*)?$", name).group(1)
|
|
|
+
|
|
|
logger.debug("mesh.animated_blend_shapes(%s, %s)", mesh, options)
|
|
|
tracks = []
|
|
|
shp = mesh.shape_keys
|
|
@@ -520,6 +525,9 @@ def materials(mesh, options):
|
|
|
logger.info("Vertex colours set to %s", use_colors)
|
|
|
|
|
|
for mat, index in material_sets:
|
|
|
+ if mat == None: # undefined material for a specific index is skipped
|
|
|
+ continue
|
|
|
+
|
|
|
try:
|
|
|
dbg_color = constants.DBG_COLORS[index]
|
|
|
except IndexError:
|