Custom frame node

I’m building a custom NodeTree and I would like to customize the frames’ node behaviour. For instance adding a “def copy()” function inside.

So I was thinking of creating my own frame custom node. The issue is that I don’t manage to create a custom node wich is a frame.

Any idea ?

I don’t think you can.

You might be able to encapsulate the duplicate_* operators with one of your own, and do the stuff you need to do to the new node, from outside.

1 Like

I see…
If I try :

class testClass(bpy.types.NodeFrame):
    bl_label = "test"
    bl_idname = 'test.test'

I get :
class “poll” attribute to be a static/class method, not a bpy_func

Could you help me with an exemple to encapsulate the duplicate_* operators ?
Or point me in the good direction :slight_smile:
Thank you

Even if you implement the poll function, it won´t work as a Frame node.

That would be just an operator that would call the original operators, and perform something else if the context is a NodeFrame in your custom nodetree. You’d need to replace the original calls though.

So the thing is to catch the dupplicate event on the frames. Even if I make a wrapper to replace the original call, I don’t see how to get this event… mmh maybe it’s not possible :confused: