TOPs - Rop Fetch - Script

   1516   10   3
User Avatar
Member
385 posts
Joined: July 2018
Offline
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?
User Avatar
Staff
596 posts
Joined: May 2014
Offline
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.
Edited by tpetrick - Feb. 13, 2024 13:34:55
User Avatar
Member
8743 posts
Joined: July 2007
Offline
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
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
385 posts
Joined: July 2018
Offline
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.

Attachments:
1.JPG (77.9 KB)

User Avatar
Member
385 posts
Joined: July 2018
Offline
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?

Attachments:
2.JPG (61.3 KB)

User Avatar
Member
385 posts
Joined: July 2018
Offline
when i press the button manually it works. but when using the pre render script it resets to frame 1 for some reason
User Avatar
Member
185 posts
Joined: Feb. 2016
Offline
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
User Avatar
Member
385 posts
Joined: July 2018
Offline
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
Edited by papsphilip - Feb. 14, 2024 09:29:18

Attachments:
Capture.JPG (61.9 KB)

User Avatar
Member
185 posts
Joined: Feb. 2016
Offline
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
User Avatar
Staff
596 posts
Joined: May 2014
Offline
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.
User Avatar
Member
385 posts
Joined: July 2018
Offline
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
Edited by papsphilip - Feb. 14, 2024 11:30:15

Attachments:
camera_to_points.hiplc (416.3 KB)

  • Quick Links