This patch fixes T82830 and additionally an unreported issue in the glTF importer. Blender has a limit for both vertex color layers and UV layers. The functions bpy.types.Mesh.vertex_colors.new() and bpy.types.Mesh.uv_layers.new() will return None once the limit is reached. The FBX importer and glTF importer didn't handle this case before and attempted to access the data, which failed. This patch adds the missing checks. In case no vertex colors or uv map can be created, the assignment of colors or uv coordinates is skipped.
Details
Details
Diff Detail
Diff Detail
- Repository
- rBA Blender Add-ons
- Branch
- 2020-11-20-layer-limits
- Build Status
Buildable 11364 Build 11364: arc lint + arc unit
Event Timeline
Comment Actions
FBX already uses this message for None new UV layer, please harmonise them.
print("Failed to add {%r %r} UVLayer to %r (probably too many of them?)"
"" % (layer_id, fbx_layer_name, mesh.name))Adding @Julien DUROURE (julien) as reviewer since he's gltf dev.
Comment Actions
@Julien DUROURE (julien) Great! Could you please accept the revision then, otherwise I can't commit this as you're currently set as blocking reviewer.