do script at frame with Python?

   1904   1   1
User Avatar
Member
99 posts
Joined: March 2009
Offline
I'm wondering if there's a way to spit out content to a text file whenever you hit a particular frame. So any time you hit frame 200, for example, it writes say a time stamp to the file.
User Avatar
Member
150 posts
Joined: May 2011
Offline
You can do it in the hou.session module. You can open it via Windows > Python Source editor. Then add something like this (mostly taken from the docs):

import hou

def outputPlaybarEvent(event_type, frame):
if frame == 200:
print frame

hou.playbar.addEventCallback(outputPlaybarEvent)

http://www.sidefx.com/docs/houdini13.0/hom/hou/playbar [sidefx.com]
Technical Reel 2015 [vimeo.com]
  • Quick Links