Skip to content

OBJ material importer fails to properly join paths #355

@LeonBrands

Description

@LeonBrands

Describe the bug
The OBJ loader fails to load textures that are stored in relative paths to the obj file. If such a path occurs, it simply adds the model's path to the path.

For example:

  • Model path: "assets:\some_folder\model.obj"
  • Texture described in mtl file: "..\texture_folder\texture.png"
  • Resulting texture path: "assets:\some_folder..\texture_folder\texture.png"

Include a MRE
Load any model where the mtl uses a relative texture path with ../

Expected behavior
The relative filepath should be resolved appropriately by checking for .. before combining the paths

Desktop (please complete the following information):

  • OS: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions