godot icon indicating copy to clipboard operation
godot copied to clipboard

FBX: Print ufbx load warnings on import

Open bqqbarbhg opened this issue 1 year ago • 2 comments

This PR adds printing of warnings reported by ufbx when importing files. This could help in diagnosing errors when users try to import half-broken files with half-broken results. ufbx itself is quite silent about warnings, so these should only be issued when there's something truly wrong with the file, in a way that might make the imported scene broken in some ways.

bqqbarbhg avatar May 03 '24 18:05 bqqbarbhg

Initial dataset testing indicates that even though errors are rare, some badly behaving files will spam an astounding amount of errors (one file so far has issued a whopping 29088 warnings). I'll probably implement a per-type warning limit to ufbx to prevent such cases, but for now (and maybe even in general) we'd want to limit the maximum amount of warning spam on Godot side as well.

bqqbarbhg avatar May 04 '24 01:05 bqqbarbhg

Limited the maximum errors to 10 per type. Also added element names (like nodes or meshes that prompt the warning) to the warnings.

bqqbarbhg avatar May 06 '24 20:05 bqqbarbhg

Thanks!

akien-mga avatar May 07 '24 11:05 akien-mga