Jump to content

Activating a script


kgoossens

Recommended Posts

Apologies. I forgot that selection is handled through hou.nodeEventType.AppearanceChanged. This is not exactly ideal however, since that callback is triggered when the node is selected, color changed, flags changed, deleted, etc. There is also no way to tell which of these methods triggered the callback. Another option is hou.nodeEventType.ChildSelectionChanged, however that is also not really idea. You would have to assign the callback to say something like /obj for the case of objects, and have the callback filter what was selected and try to determine which objects you should try to run a particular script for. Another downside to this is that the callback only gives you the node that had its child selection changed, not the change in the selection itself. You would then have to do something with the hou.Node.selectedChildren() output to determine what changed and so forth.

Edited by graham
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...