I need a hotkey that places an active layer node into new nested groups at the active layer’s position. The following code does not work entirely, as it creates the new parent nodes, but it does not move the active node into the group I need it to be in.
I’m new to coding so I don’t know the details, but I think … is probably because activeNode is already added to the layer stack, and addchildNode() is a function that targets a node that has not yet been added to the stack. Or it could be that addchildNode() is a function for “adding” layers, not “moving” them.