Screenshot model library in TOPs

   2748   3   3
User Avatar
Member
9 posts
Joined: 3月 2021
Offline
I'm trying to create a screenshot of my model library which I'll pipe into ImageMagick to create a montage. Rather than rendering each model, I'd just like to take a viewport screenshot.

My setup is pretty simple.

* A filepattern node which scans for all .fbx's in a folder.
* A geometryimport node to pull in the geo.
* attribcreate to create a string with the key "image_path" and the value pointing to where I want to save the flipbook image
* lastly a pythonscript node to create the viewport (flipbook) snapshot



When I run it, I get correctly named images saved to the /flip directory, but they're all the same content.



I've tried calling .draw() on the GeometryViewport and a few other things.

Any advice?

Attachments:
SNAG-0480.jpg (89.6 KB)
SNAG-0481.jpg (44.9 KB)

User Avatar
Member
49 posts
Joined: 2月 2016
Offline
I don't know how's the sop part of the file looks like so I could be wrong, but I could think of two things that could be causing problems:
  1. The geometry file name attribute didn't pass it to the file node in sop correctly
  2. Flipbook could have problems working with pdg since it's integrated with the viewport, use Opengl or mantra instead
User Avatar
Member
9 posts
Joined: 3月 2021
Offline
benC
I don't know how's the sop part of the file looks like so I could be wrong, but I could think of two things that could be causing problems:
  1. The geometry file name attribute didn't pass it to the file node in sop correctly
  2. Flipbook could have problems working with pdg since it's integrated with the viewport, use Opengl or mantra instead

Can I use OpenGL or Mantra do just do a viewport screenshot? Is there any documentation for it in the python docs do you think?
User Avatar
Member
49 posts
Joined: 2月 2016
Offline
OpenGL would be closer to the viewport screenshot but they are not exactly the same. Just fetch the node to the TOP from a ROP network.
  • Quick Links