kgoossens Posted February 20, 2012 Share Posted February 20, 2012 Hi, is it possible to have a python script within a digital asset that is activated upon selecting another non-specific node in the network editor? Something like what you can do with scriptJob in maya Quote Link to comment Share on other sites More sharing options...
graham Posted February 20, 2012 Share Posted February 20, 2012 Unfortunately Houdini doesn't have an event handler for selecting nodes, other than the Select Script parameter on Object nodes. Quote Link to comment Share on other sites More sharing options...
bhaveshpandey Posted February 20, 2012 Share Posted February 20, 2012 (edited) event handlers or selection scripts in the hda module?? not sure if thats what your looking for. edit : ahh..I checked there's nothing like what i said! this is embarrassing! Edited February 20, 2012 by bhaveshpandey Quote Link to comment Share on other sites More sharing options...
graham Posted February 20, 2012 Share Posted February 20, 2012 (edited) 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 February 20, 2012 by graham Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.