Maniphest T97794

New OBJ importer: material library filenames might be quoted (see T67266)
Closed, ResolvedBUG

Assigned To
Aras Pranckevicius (aras_p)
Authored By
Jesse Yurkovich (deadpin)
May 3 2022, 7:41 AM
Tags
  • BF Blender
  • Import/Export
Subscribers
Aras Pranckevicius (aras_p)
Jesse Yurkovich (deadpin)
Pratik Borhade (PratikPB2123)

Description

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.09

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-05-02 09:18, hash: rBf0f44fd92f1

Short description of error
Going through old reports. It seems as though some software or existing .obj files may be using quotes surrounding their material library names.

There's nothing in the spec in this regard really but a decision was made for the python importer to deal with it...

Exact steps for others to reproduce the error

  • Load the provided .obj with .mtl file from T67266
  • Observe failure to load the library

OBJ import: cannot read from MTL file: 'G:\triage\"name with blanks.mtl"'

Note After D14822 is checked in that particular test will work by accident since another material library, with a proper name, will be added implicitly. However, the scenario won't work generally.

Inside the OBJ file it looks like mtllib "name with blanks.mtl"

Revisions and Commits

rB Blender
D14838

Event Timeline

Jesse Yurkovich (deadpin) created this task.May 3 2022, 7:41 AM
Pratik Borhade (PratikPB2123) added a subscriber: Pratik Borhade (PratikPB2123).May 3 2022, 11:38 AM

I'm not able to repro this in current master.

I mean I don't get any error when loading those files. Maybe I'm missing something for reproducing it correctly

Aras Pranckevicius (aras_p) added a subscriber: Aras Pranckevicius (aras_p).May 3 2022, 12:58 PM
Jesse Yurkovich (deadpin) added a comment.May 3 2022, 7:53 PM

Try with the following set of files. You'll notice the error inside the terminal and that the object's Material is incorrect (base color should be Green; can compare with python importer)

Pratik Borhade (PratikPB2123) changed the task status from Needs Triage to Confirmed.May 4 2022, 4:31 AM
Pratik Borhade (PratikPB2123) added a project: Import/Export.
Aras Pranckevicius (aras_p) claimed this task.May 4 2022, 5:47 AM
Aras Pranckevicius (aras_p) changed the subtype of this task from "Report" to "Bug".
Aras Pranckevicius (aras_p) closed this task as Resolved by committing rBcbeb8770cc4d: Fix T97794: new OBJ importer does not handle quoted MTL paths.May 4 2022, 2:11 PM
Aras Pranckevicius (aras_p) added a commit: rBcbeb8770cc4d: Fix T97794: new OBJ importer does not handle quoted MTL paths.