Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'ShaderNodeTree' object has no attribute 'outputs' #2323

Open
DGriffin91 opened this issue Aug 18, 2024 · 3 comments · May be fixed by #2353
Open

AttributeError: 'ShaderNodeTree' object has no attribute 'outputs' #2323

DGriffin91 opened this issue Aug 18, 2024 · 3 comments · May be fixed by #2353
Labels
bug Something isn't working

Comments

@DGriffin91
Copy link

Describe the bug
When trying to export the poly haven Hidden Alley scene from blender 4.2 I get the error:

File "C:\Program Files\Blender Foundation\Blender 4.2\4.2\scripts\addons_core\io_scene_gltf2\blender\exp\material\gltf2_blender_search_node_tree.py", line 904, in check_if_is_linked_to_active_output
    sockets = group_path[-1].outputs
              ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ShaderNodeTree' object has no attribute 'outputs'

To Reproduce
Steps to reproduce the behavior

  1. Download the blend file from https://blog.polyhaven.com/hidden-alley/
  2. Export as gltf
  3. See error in console

Expected behavior
For the exporter to not crash.

.blend file
https://dl.polyhaven.org/file/ph-assets/Scenes/hidden_alley.zip

Version

  • OS: Windows 10
  • Blender Version 4.2
@julienduroure
Copy link
Collaborator

Confirmed.
Node tree Mesh with issue : Floor_main

@julienduroure julienduroure added this to the Blender 4.2 LTS milestone Aug 18, 2024
@julienduroure julienduroure added the bug Something isn't working label Aug 18, 2024
@julienduroure
Copy link
Collaborator

Here is in attachment the minimal file that show the issue (well, the original file was 1.4 Go .... !)
Looks like maybe an issue in Blender file itself, as if you enter node group, remove the BSDF/BSDF link, and add it again : No more crash...
minimal_bug_shader.blend.zip

Investigation in progress

@julienduroure
Copy link
Collaborator

Investigation progress:
We have an issue on our code, when a socket is linked to 2 output socket of an output group

Unplug/plug again solve the issue because it changes the link order of the socket, and now the "correct" socket goes first, before the second one

@julienduroure julienduroure linked a pull request Sep 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants