New OBJ importer: material library filenames might be quoted (see T67266) #97794

Closed
opened 2022-05-03 07:41:03 +02:00 by Jesse Yurkovich · 8 comments

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: f0f44fd92f

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

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"

**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: `f0f44fd92f` **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 blender/blender-addons#67266 - Observe failure to load the library `OBJ import: cannot read from MTL file: 'G:\triage\"name with blanks.mtl"'` **Note** After [D14822](https://archive.blender.org/developer/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"`
Author
Member

Added subscriber: @deadpin

Added subscriber: @deadpin
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

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

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

Added subscriber: @aras_p

Added subscriber: @aras_p
Author
Member

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)

test spaces lib.mtl

test spaces.obj

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) [test spaces lib.mtl](https://archive.blender.org/developer/F13049700/test_spaces_lib.mtl) [test spaces.obj](https://archive.blender.org/developer/F13049699/test_spaces.obj)
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Aras Pranckevicius self-assigned this 2022-05-04 05:47:59 +02:00

This issue was referenced by cbeb8770cc

This issue was referenced by cbeb8770cc4daec5c81f8d8ce060a1b594c039bb

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#97794
No description provided.