Jump to content
ikoon

single .py script to playbar.play() or playbar.stop() depending on playbar.isPlaying()

Recommended Posts

I was using this simple script (with hotkey) for a while, but it is probably not right way to do it.

Sometimes the playbar gets "stuck" and play() command doesn't work. Even if I run hou.playbar.play() from the python shell. I have to push the UI play button then.

I assume, that a right way is to use eventCallback(), but I cannot make it work, too. Please, do you anybody have working script for that?

 

if hou.playbar.isPlaying() :
    hou.playbar.stop()
else :
    hou.playbar.play()

 

Share this post


Link to post
Share on other sites

Using eventCallback is not the right way, the right way would be submitting a bug report since your code is totally fine and should work.

  • Thanks 1

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

×