Skip to content

[3.6] Setting OBJ to use .material file only works after manually re-importing. #96774

@drwhut

Description

@drwhut

Tested versions

  • Reproducible in: 3.6
  • Not reproducible in: 3.5.3

System information

Linux Mint 22

Issue description

For some reason starting from Godot 3.6, when an .obj file is imported as a scene, even if in the import options it is specified that there should be a separate .material file, the first time it is imported the .scn that is generated has the material built-in, and it does not reference the .material file even though it exists. Only after the .obj file is manually re-imported (or the .import folder is manually deleted), does the generated .scn file reference the .material file.

This behaviour is affecting the output of ResourceLoader.get_dependencies, which is how I found this issue.

Any help in figuring out what changed between 3.5.3 and 3.6 would be greatly appreciated!

Steps to reproduce

  1. Open the project. The .obj file should be imported as a mesh.
  2. Switch the .obj file from being imported as a mesh, to being imported as a scene.
  3. Restart the editor as prompted.
  4. Once the editor is back, run the scene. The output shows an empty array [], when it should be [res://red_mat.material].
  5. Manually re-import the .obj file, and run the scene again. Now the output is [res://red_mat.material], as expected.

Minimal reproduction project (MRP)

DependencyBug.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Up for grabs

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions