nvm, I misunderstood post maybe someone with coding experience can help!
Summary
are you sure there are no conflicts with shortcuts?
I used to have plenty of problems similar to this when upgrading through blender versions and importing older user settings
see if it works with default blender file
if it does, then you should consider starting a fresh config/keymap setup from scratch
-otherwise OpenVFX: The Blender Hub (discord), i got some python help there one time, altho the server grew a ton since that happened so you should be persistent and maybe @ directly someone who might help
-and lastly thereâs Blender.chat , a lot of blender devs hang out there so you might get some help if they answer back (I never tried it much, its a bit over my expertise lol, but i lurk sometimes to see whatâs going on)
ps: Iâd recommend looking through some currently active addon developer (for example here) and maybe directing your question to them via any social media dm you happen to find
good luck! sorry I canât help but if you persist youâll find answers for sure
Well, I am slightly further along with this problem.
Iâve figured out how to call bpy.ops.node.group_ungroup() without the context incorrect problem.
The issue I have now is that I want to change the active material slot on an object while the script is running so that the correct materialâs nodes are actually shown in the node editor.
I can make this change, but it doesnât take effect until the script is stopped, so thatâs no use to me.
Currently looking for a way to pause the script to allow Blender to update, and then resume it. Might end up being some overly complicated arrangement using timers.
Iâm afraid that I no longer have the code (as I abandoned this), however, if you search StackExchange for override context you will find some guidance.
Thank you for the tip (âoverrideâ), that will come in in handy! I made a button inside the node editor for my script. -I just saw 21. January, now I realized this means jan. 2021.
I needed my script to start from the 3D view, so a button in the node editor wasnât an option for me.
What I ended up with was a modal timer. I change the viewport area to a node editor, and then have a timer that executes one step of what I want to do per interval (change active material, ungroup node group, change active material etc.). At the end I restore the viewport area to whatever it was originally.
Iâve no idea if thatâs the best or only way to do it. Itâs kind of hideous. But it does work.
Why not a timer. But isnt there something that your function reports âreadyâ and then the next step starts, more in a âbatchâ way?
I found this in someones script. The comment is very funny: âoverride = bpy.context.copy() #i donât know what it does. without it it says the context is wrongâ.
I am just throwing in patches of python, and most times it starts to work somehow, and maybe later I get why something does not work. It takes me soo long time to find, but when it does work, its like magic.
Iâm struggeling with getting/finding a node_group by name (name startswith âtext***â) 'inside a Material. I cant get it to work. something like: âfor i in active material.node_groups.names.â
I can already select the nodegroup by name and ungroup it from script ( inside Node editor). But I need to find out the right name first.