Page MenuHome

Fix T97863: new OBJ importer issues with extra whitespace after "f" keywords
ClosedPublic

Authored by Aras Pranckevicius (aras_p) on May 5 2022, 9:44 AM.

Details

Summary

Fixes T97863: while possible extra whitespace after all OBJ/MTL keywords was properly skipped, it was not done for the "f" (face definition) keyword.

While at it, also support indented keywords, i.e. extra whitespace at the beginning of the line.

There's a tiny bit of performance drop while importing (e.g. importing blender 3.0 splash scene: 53.38sec -> 54.21sec on my machine). But correctness is more important!

I'll update obj/materials.obj in the subversion tests repo to capture this, like this:

# whitespace after keyword
v    1.0 1.0 -1.0
# indented keyword
    v 1.0 -1.0 -1.0
# ...
# whitespace after keyword
f     5 8 4 1  
# indented keyword
    f 5 6 7 8

Without the fix, the import test would be failing.

Diff Detail

Repository
rB Blender