EpicGamesExt / BlenderTools

Blender addons that improve the game development workflow between Blender and Unreal.
https://epicgamesext.github.io/BlenderTools/
MIT License
2.7k stars 26 forks source link

Validation fix: detect invalid material assigned to polygon. #656

Closed SalamiArmi closed 8 months ago

SalamiArmi commented 11 months ago

Encountered this while swapping some materials in my scene to use a shared file, which caused some polys on preexisting meshes to point to invalid materials. On validation, mesh_object.material_slots[polygon.material_index] threw a very vague exception that took me a few hours to track down. Now instead, it will raise an error point to the exact mesh + polygon that is invalid.