Jump to content

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


ikoon

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()

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

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...