-
Notifications
You must be signed in to change notification settings - Fork 55
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
GLTF Utilities - error - Cannot add socket to built-in node #185
Comments
For anyone else struggling with this. I dug into the code and did some readup on the topic. This is how I changed the TLM_AddGLTFNode in tlm.py to get it working
|
Hi, thank you! Here is the diff: https://gist.github.com/jywarren/b021a934995eeb690352fe9004ae4aa1/revisions Applied to this file: |
I'm now seeing a different error -
|
Ah - noting I'm in Blender 4.1. I'm seeing some slightly different-looking naming conventions which could be related: The_Lightmapper/addon/utility/utility.py Lines 270 to 300 in 6e9e3a8
|
Most likely due to Blender 4.1. I was using the latest Blender 3.6.x release |
Just noting via this post:
instead,
|
https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Python_API I think it would need to be: if 'Occlusion' not in gltf_settings_node.items_tree:
gltf_settings_node.node_tree.interface.new_socket(name="Occlusion", in_out='INPUT') This worked!! |
Sorry for borderline necroing this, but I have sort of the same issue as in this thread. Started with the same issue as Sweco. Trying the addon on 4.2 as downgrading isn't an option. First of all, thanks a bunch for making the addon work with 4.0+! I tried going through the motions sort of like this thread went, had Swecos issue, then edited in the gist change from Warren and got the second error (no inputs). I then applied the
This did not work however, and the fix was simply to change "items_tree" to "node_tree" in the if-statement. Pasting the whole fixed class here in case someone else has the same issue and don't want to go through all the editing, saving and restarting.
|
Hi @Braatwaathe Thanks for the code, I just included it (e81fcfc) - I must admit I haven't been working much on the main branch in a while, and mostly spent time on the new 1.0 branch, so there's a fair bit of new bugs that occasionally show up from the Blender version changes |
All credit goes to Sweco and Warren, I just changed "items" to "node"! I'd still probably vet this before pushing it though, there might be more issues (at least on 4.2) Tried reloading blender now and now it won't export files properly again, and the gltf material output node group is empty. So yeah, at least the error messages are gone, but there is still something wrong. |
Seems like there are some other issues indeed: the created GLTF utility node tree seems to loop. I don't know what's the intended behavior here but the node tree is a multi user group with one occlusion input for each material in the scene, but every material plugs into the topmost input. There are still no other inputs on the node, but that might be intended. The multiply node shifting also as issues:
|
I'm using Blender 3.6.9
I want to export the lightmaps to gltf. I get an error when clicking the "Add GLTF node" button:
Any ideas on how to fix that?
The text was updated successfully, but these errors were encountered: