Oops. I meant to say -- "I am a little confused here" :). On Fri, Dec 8, 2017 at 10:10 AM, Utkarsh Ayachit <utkarsh.ayac...@kitware.com> wrote: > Hmm, little confused here? Why not keep the timesteps in the reader > unchanged and explcitly do the timestep of interest and save > screenshot? > > On Thu, Dec 7, 2017 at 10:51 AM, Heiland, Randy <heil...@iu.edu> wrote: >> Utkarsh, >> >> Thanks very much for that! Yes, after some fiddling, I got it to work, >> i.e., I can save .png files for an animation! So now that I’m using the >> Programmable Source(RequestInfo) script to accomplish the animation, how do >> I, during a PV session, *easily* switch back to render a single file? >> >> For example, I can do: >> frames = range(0,801,100) # render every 100th frame, including 800 >> setOutputTimesteps (self, frames) >> >> or, I can explicitly list specific frames: >> frames = [100,101] >> >> so, I thought this would do a single file, but it doesn’t (my previous >> frames are still there): >> frames = [600,] >> >> -Randy >> >> >> >>> On Dec 6, 2017, at 10:44 PM, Utkarsh Ayachit <utkarsh.ayac...@kitware.com> >>> wrote: >>> >>> Randy, >>> >>> You attempting to mix the Python scripting for data processing and >>> Python scripting for batch scripting. The two environments are >>> separate. Here's how I'd tackle it. >>> >>> 1. Make your "Programmable Source" become a temporal source i.e. >>> report to ParaView that it can produce timesteps matching the files >>> your file series. See [i]. If you get this right, you shuold be able >>> to render through all the files by hitting "Play" in the VCR control >>> in the UI. >>> 2. Now you can write a batch script that either loads the predefined >>> pvsm state file or builds up the pipeline in Python itself and the >>> either uses `SaveScreenshot` or `SaveAnimation` to save out the >>> animation. >>> >>> You can then mix in camera animations too. You can always use the >>> Python tracing in UI to figure out how to save images and/or animation >>> in the batch scripting environment. >>> >>> Hope that helps. >>> Utkarsh >>> >>> [i] >>> https://blog.kitware.com/defining-time-varying-sources-with-paraviews-programmable-source/ >>> >>> On Wed, Dec 6, 2017 at 11:15 AM, Heiland, Randy <heil...@iu.edu> wrote: >>>> I’m probably missing a basic concept and hoping someone can enlighten me. I >>>> have a pipeline with a Programmable Source that reads in a (non-VTK >>>> formatted) file, I process it and then I have filters in my pipeline that >>>> act on that data. I want to be able to feed multiple files to the pipeline, >>>> save images and/or create animations. I naively created a Python function >>>> in >>>> the Pgmable Source, then save the PV State to a Python script, thinking I >>>> could call the function from the end of that script. Doesn’t seem to be >>>> possible. And I confess I’ve not given this deep thought - it’s easier to >>>> ask the experts :-) Bottom line, we want to make this as dead simple for >>>> our own users. >>>> >>>> Fwiw, I’ve zipped up 2 files - a .pvsm and a sample data file here: >>>> http://pages.iu.edu/~heiland/physicell/pv_pcell.zip . You’d need to edit >>>> the >>>> “dir” path in the Pgmable Source. >>>> >>>> Initially, I just want to save images/animation (over multiple files) with >>>> a >>>> fixed camera view; later, it’d be nice to have simultaneous camera >>>> movement. >>>> >>>> thanks, Randy >>>> >>>> _______________________________________________ >>>> Powered by www.kitware.com >>>> >>>> Visit other Kitware open-source projects at >>>> http://www.kitware.com/opensource/opensource.html >>>> >>>> Please keep messages on-topic and check the ParaView Wiki at: >>>> http://paraview.org/Wiki/ParaView >>>> >>>> Search the list archives at: http://markmail.org/search/?q=ParaView >>>> >>>> Follow this link to subscribe/unsubscribe: >>>> http://public.kitware.com/mailman/listinfo/paraview >>>> >> _______________________________________________ Powered by www.kitware.com
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview