Jump to content
salik

Runs a script check whenever diving into a node

Recommended Posts

Posted (edited)

Is it possible to script or something, such that whenever I dive in this particular node, it will check and set the update mode to use "Auto Update"?

 

Many thanks in advance!

Edited by salik

Share this post


Link to post
Share on other sites

There is no update mode for entering a context or area in a path. It also does not seem very Houdini-centric for what you are doing, I would suggest maybe tackling the issue from a different angle. What are you trying to accomplish? There may be better ways to tackle the issue.  

 

*If you really wanted to go crazy you could have a continuously running python script at launch, that detects the mouse position in the network pane, and then checks against the node path. But that would be a very dirty, dirty way of accomplishing it.

Share this post


Link to post
Share on other sites
5 hours ago, LaidlawFX said:

There is no update mode for entering a context or area in a path. It also does not seem very Houdini-centric for what you are doing, I would suggest maybe tackling the issue from a different angle. What are you trying to accomplish? There may be better ways to tackle the issue.  

 

*If you really wanted to go crazy you could have a continuously running python script at launch, that detects the mouse position in the network pane, and then checks against the node path. But that would be a very dirty, dirty way of accomplishing it.

Hi there, in my current workplace, it requires one to set the update mode to "Auto update" when diving into this particular node.

So there are times that I have forgotten about it which results me to do another round of publishing, not to mention that sometimes it requires me to reopen the file which could take some time.

While it mostly rests upon user to set the mode (how hard can it be, right?), it is simply I was trying to find out if there are any other better ways to get around it. Running a script is what I can think of but I do agree with you that having a script that continuously running in the background is ideal. 

If not, I shall stick with 'always remember to set the mode when diving in node X' :D

Share this post


Link to post
Share on other sites
Posted (edited)
14 minutes ago, salik said:

So there are times that I have forgotten about it which results me to do another round of publishing

why not make a copy of your publishing tool and then add a line of code before it executes the publish to set mode to "Auto Update"?

maybe something like:

if mode == 'Manual'

hou.setUpdateMode(hou.updateMode.AutouUpdate)

Edited by Jesper Rahlff

Share this post


Link to post
Share on other sites
On 3/21/2018 at 3:37 PM, Jesper Rahlff said:

why not make a copy of your publishing tool and then add a line of code before it executes the publish to set mode to "Auto Update"?

maybe something like:

if mode == 'Manual'

hou.setUpdateMode(hou.updateMode.AutouUpdate)

Sorry for the late reply - I am aware of the above code and have been using it in other aspects for my workflow. It hits to me at the publishing stage that this issue, while minor can be easily resolve but it is not being implemented. Not to mention that at times of crunch time, when you are trying to push out everything, this can be easily missed (at least for me.)

On 3/22/2018 at 1:00 AM, anim said:

you should be able to do it using EventHandler and intercept ContextEvent for your HDA, or if you want globally, then do whatever you want based on the context change, which is your dive

http://www.sidefx.com/docs/houdini/hom/network.html#intercepting-events-for-an-hda

Thanks for the link, I will check it out and see if I can get it implemented!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×