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

Can't convert Node Groups in Blender 4.0 #77

Closed
trmhtk2 opened this issue Dec 31, 2023 · 1 comment · Fixed by #78 or #85
Closed

Can't convert Node Groups in Blender 4.0 #77

trmhtk2 opened this issue Dec 31, 2023 · 1 comment · Fixed by #78 or #85
Labels
duplicate This issue or pull request already exists

Comments

@trmhtk2
Copy link

trmhtk2 commented Dec 31, 2023

I tried to use the NodeToPython add-on to convert Material Node Groups in Blender 4.0, but it gives the following error:

Python: Traceback (most recent call last):
   File "C:\ [...] \Blender Foundation\Blender\4.0\scripts\addons\NodeToPython\materials.py", line 246, in execute
     process_mat_node_group(nt, level, node_vars, used_vars)
   File "C:\ [...] \Blender Foundation\Blender\4.0\scripts\addons\NodeToPython\materials.py", line 192, in process_mat_node_group
     process_mat_node_group(node_nt, level + 1, node_vars,
   File "C:\ [...] \Blender Foundation\Blender\4.0\scripts\addons\NodeToPython\materials.py", line 212, in process_mat_node_group
     group_io_settings(node, file, inner, "output", nt_var, node_tree)
   File "C:\Users\Golden Dragon\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\NodeToPython\utils.py", line 276, in group_io_settings
     ntio = node_tree.outputs
AttributeError: 'ShaderNodeTree' object has no attribute 'outputs'

I'm pretty sure it's because of Blender 4.0's new NodeTrees system.

I would love to have it fixed.
(By the way, thanks for the great add-on, it really helps me!)

@BrendanParmer BrendanParmer added the duplicate This issue or pull request already exists label Dec 31, 2023
@BrendanParmer
Copy link
Owner

(Traveling right now and typing on mobile) Hi @trmhtk2, thanks for submitting an issue. You're right, this is an issue with the new node tree representation.
There's a Blender 4.0 Breaking Changes branch that I've been working in that should solve at least this problem. I'd consider it experimental for now, but so far it seems to be working fine with 3.6 node groups brought over to 4.0. Right now the branch still won't support new 4.0 features/nodes like node panels or repeat zones, but I'm targeting those for the next NodeToPython release, hopefully this upcoming month (see #59)

Happy New Year! 🎉

@BrendanParmer BrendanParmer linked a pull request Jan 3, 2024 that will close this issue
@BrendanParmer BrendanParmer linked a pull request Jan 28, 2024 that will close this issue
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants