検索 - User list
Full Version: TOPs - Rop Fetch - Script
Root » PDG/TOPs » TOPs - Rop Fetch - Script
papsphilip
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
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
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
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
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
when i press the button manually it works. but when using the pre render script it resets to frame 1 for some reason
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
papsphilip
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
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
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
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB