Page MenuHome

Fix T97794: new OBJ importer does not handle quoted MTL paths
ClosedPublic

Authored by Aras Pranckevicius (aras_p) on May 4 2022, 10:12 AM.

Details

Summary

Fixes T97794 (which is a reintroduction of an older issue T67266 that has been fixed in the python importer, but the fix was not in the C++ one). Some software produces OBJ files with mtllib statements like mtllib "file name in quotes.mtl", and the new importer was not stripping the quotes away.

While at it, I noticed that MTLParser constructor was taking a StringRef and treating it as a zero-terminated string, which is not necessarily the case. Fixed that by explicitly using a StringRefNull type.

Diff Detail

Repository
rB Blender

Event Timeline

Aras Pranckevicius (aras_p) requested review of this revision.May 4 2022, 10:12 AM
Aras Pranckevicius (aras_p) created this revision.
Aras Pranckevicius (aras_p) edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.May 4 2022, 12:50 PM