Python ROP Current Frame
935
2
1
krueger
Member
191 posts
Joined: Oct. 2018
Offline
Feb. 13, 2020 7:43 p.m.
I'm trying to get the current frame in a python rop, but the regular hou.frame() doesn't work. In SOPs it prints out the frame being evaluated but in the ROP it just prints out the frame that I hit the render button on. Any ideas how to fix this?
frame = hou . frame ()
print frame
In a SOP gives me this:
15.0
16.0
17.0
18.0
19.0
20.0
In a ROP gives me this:
Enivob
Member
2519 posts
Joined: June 2008
Offline
Feb. 15, 2020 9:11 a.m.
Pre and Post Render fields do seem to have that problem. Try placing your script in the Pre-Frame Script field, instead.
Using Houdini Indie 20.0 Ubuntu 64GB Ryzen 16 core. nVidia 3050RTX 8BG RAM.
krueger
Member
191 posts
Joined: Oct. 2018
Offline
Feb. 18, 2020 2:07 p.m.
Enivob Pre and Post Render fields do seem to have that problem. Try placing your script in the Pre-Frame Script field, instead.I was using the code in a python rop itself, not in the pre/post scripts. But using it in the pre-frame script does work correctly. Thanks!