I'm trying to write out multiple variations of the same object as fbx's (I have to use fbx), the object is set to change every frame. Unfortunately when you set a frame range on the the Filmbox FBX ROP you don't get multiple fbx's, you just get one with a point cache.
I put a script on the object to change the start and end frame of the ROP to the current frame (which works), followed by
hou.parm('/out/filmboxfbx1/execute').pressButton()
Which when pressing play writes out a bunch of fbx's but unfortunately they're all empty; the script gives an infinite recursion in evaluation error.
I then tried making a tool that runs a script
for n in range (1, 101):
hou.setFrame(n)
hou.parm('/out/filmboxfbx1/execute').pressButton()
This only writes out 1 frame. I even tried using threading and sleep incase it was because it was executing the render button too quickly, no dice.
Does anyone know how I can achieve this?