Search - User list
Full Version: Convert .exrs from multiple rops to .png
Root » PDG/TOPs » Convert .exrs from multiple rops to .png
Eche
Hello, new tops user here.

I have a Solaris network that contains multiple USD render ROPs, I would like to build a TOP network that will:

  • Render each rop sequentially.
  • Convert the .exr files from each ROP to .png in the same location of each .exr with the same filename, just replacing
    *.exr
    
    with
    *.png
    

Currently in my TOP network I am using RopFetch nodes followed by imagemagic nodes set to python expression language and operation "convert" with the "output file path" set to:
`@pdg_input`[:-3]+.png

I would expect this to use python string slicing to strip .exr from the incoming file path and replace it with .png for output, however I get my output files named:
*.exr[

Is this just bad syntax on my part? I would really like to set the file paths procedurally like this and avoid a spider web of relative reference parameters from the USD render ROPs to build the output file names.
mestela
The rats nest of hscript vs python vs backticks vs tops attribs can be tricky.

Lately myself and coworkers steer away from @pdg_input, and instead generate standalone new attributes using the string filtering and attrib create top nodes to define them. It's more nodes, but we find it a little easier to debug.

Attached an example.
Eche
OK got that working, thanks Matt!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.