do script at frame with Python?

   1155   1   1
User Avatar
99 posts
Joined: March 2009
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
150 posts
Joined: May 2011
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) []
Technical Reel 2015 []
  • Quick Links