Jump to content

General OnCreated event for every node


DonRomano

Recommended Posts

Hello everyone,

Is it possible to add a callback that runs everytime a node is created ? At my studio we have a library of hda (hundreds of nodes) and I'd like to check if the node comes from the general library, or the project library and simply set a color depending on its definition path.

I tried scripts/OnCreated.py with a package and appending the path to the Houdini path but nothing is happening. I also thought appending a few lines of code using

nodeDefinition.sections()["OnCreated"].setContents("print('Hello')")

but doing this for hundreds of hda's, and everytime one is created, requires a bit more work than what I can do for now.

Is there a solution ? I've looked at ui event but I haven't found anything interesting.

 

Cheers,

Edited by DonRomano
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...