Python ROP Current Frame
984
2
1
krueger
Member
191 posts
Joined: 10月 2018
Offline
2020年2月13日 19:43
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
2536 posts
Joined: 6月 2008
Offline
2020年2月15日 9:11
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 Windows 11 64GB Ryzen 16 core. nVidia 3050RTX 8BG RAM.
krueger
Member
191 posts
Joined: 10月 2018
Offline
2020年2月18日 14:07
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!