Flipbook Script

   2258   1   0
User Avatar
Member
326 posts
Joined: Jan. 2013
Offline
Hello everyone!

I'm trying to use a script to create images from a flipbook, but using it in a Python Script node with the Cook(In Process) parameter causes the entire application to crash, but it works if I switch to Generate. And the second moment, in Generate mode, it calculates only one frame from a given range, and for some reason considers it to be a zero frame.

The reason I want to use a similar script instead of rendering on OpenGL is the much faster generation speed. Calculating a flipbook from a viewport turned out to be a much faster script than using OpenGL for this.

import toolutils

sceneViewer = toolutils.sceneViewer()
flipbook_options = sceneViewer.flipbookSettings().stash()

flipbook_options.outputToMPlay(False)
flipbook_options.output("$HIP/Pig_Preview.$F4.jpeg")
flipbook_options.frameRange((1,10))

sceneViewer.flipbook(sceneViewer.curViewport(), flipbook_options)
Image Not Found

Attachments:
pdg_flipbook_script.hiplc (324.7 KB)

User Avatar
Member
326 posts
Joined: Jan. 2013
Offline
I realized what my mistake was, I didn’t use All Frames in One Batch mode in ROP Fetch. This, of course, has already been discussed many times, overhead consumables for preparing one work item in a separate process can be more expensive than if one process considers all the easy work.
  • Quick Links