This might be a bit of a weird one, but I'm looking to write a Python node that will, upon a user's input of a folder path, replace itself with a node group that contains itself and other nodes based on the contents of the folder. I'm trying to perform this transformation:
User inputs folder path
MyNodeGroup: MyNode Other Nodes
Is this possible?
I imagine I'd have to create and instance the group immediately, then move my node into it along with any other new nodes that I need. If it's not possible to move an existing node into a group, could I create an identical node and then delete the old?
Any advice on this problem is greatly appreciated!
Edit: Or, if groups are not the most appropriate mechanism for this, is it possible to maintain other nodes inside my node internally?