papsphilip
2024年2月13日 12:44:04
I need to press via script a specific "Refresh" button in SOPs so that TOPs cooks every frame the correct geo.
Is there a place for Scripts in Rop Fetch as is the case with ROP Geometry Output for example?
tpetrick
2024年2月13日 13:29:45
The script parameters on the ROP Geometry Output are on the underlying Geometry ROP itself, and are just promoted onto the TOP node. If you want to run a pre/post script with a ROP Fetch you'll need to put them in the pre/post script field(s) of your ROP.
tamte
2024年2月13日 14:16:54
while I haven't used it, it looks to me that ROP Fetch TOP/Reload Parm Path is made for this purpose
based on tooltip, you specify path to a parm (parms?) that you want to be pressed before each frame
papsphilip
2024年2月14日 05:24:27
tpetrick
The script parameters on the ROP Geometry Output are on the underlying Geometry ROP itself, and are just promoted onto the TOP node. If you want to run a pre/post script with a ROP Fetch you'll need to put them in the pre/post script field(s) of your ROP.
that didn't work unfortunately.
added hou.parm('/obj/EXPORTS/camera_to_points1/renderme').pressButton() as a pre-render script
but still when the TOP cooks the workitems the output images are all the same, from the same frame.
papsphilip
2024年2月14日 05:26:09
tamte
while I haven't used it, it looks to me that ROP Fetch TOP/Reload Parm Path is made for this purpose
based on tooltip, you specify path to a parm (parms?) that you want to be pressed before each frame
yeah looks like what i need but didn't work. not sure why. maybe has to do with the node i am trying to access and press the button?
papsphilip
2024年2月14日 07:14:21
when i press the button manually it works. but when using the pre render script it resets to frame 1 for some reason
AslakKS
2024年2月14日 08:40:49
If you don't specify what frame it should load at (with @pdg_frame) you can override it on the ROP Fetch under Frames and Batching. Otherwise it's going to load the scene at frame 1
papsphilip
2024年2月14日 09:27:20
AslakKS
If you don't specify what frame it should load at (with @pdg_frame) you can override it on the ROP Fetch under Frames and Batching. Otherwise it's going to load the scene at frame 1
i guess you mean the override frame option. i have set it to frame range, why do i need the override option?
the problem remains even if i hit render from the ROP File output itself (in COPs), where the pre-render python script is set also
AslakKS
2024年2月14日 09:51:36
Well if you have a pre-render script it will execute on the first frame of the sequence (or frame 1?) if you want it to execute every frame you need pre-frame script.
I also believe the `Reload Parameter Path` is only pressed once if you have `All Frames in One Batch enabled`
Should be easy enough to test by printing the hou.frame() in the script and then looking in the logs
tpetrick
2024年2月14日 10:38:05
papsphilip
that didn't work unfortunately.
added hou.parm('/obj/EXPORTS/camera_to_points1/renderme').pressButton() as a pre-render script
but still when the TOP cooks the workitems the output images are all the same, from the same frame.
Your script is in the pre-render parameter, which runs once per render on the first frame of the render. It sounds like you want to have it in the pre-frame script instead, which runs once a frame.
Regarding the the reload parameter option on the ROP Fetch itself, the button specified in that parameter should be pushed every frame even when using a batch.
papsphilip
2024年2月14日 11:26:37
Not working even with pre-frame script. Here is a simple scene reproducing the problem. requires a node from mlops.
There is a possibility this is an mlops bug, but would appreciate it if at least someone else can confirm this as well