![]() ![]() ![]() Your mileage may vary, especially if you’re creating complex scenes, in which case the state file may be your best bet. I find the scripts are easier to read, understand & extend. My personal preference is to assemble the scene using the Python functions, but my scenes are pretty simple. You can create this little script using Trace of course □ pvsm) to save your GUI sessions – handy for jumping back in at a later date, perhaps with another dataset.įor your trickier scenes, you could save a state file & use a simple Python script to read it in & write out your images, animations, or whatever you need. You’re probably already using state files (. In that case you might want to make use of state files. But it can still take a while to assemble really complex scenes. The “Trace & Docs” combo will get you almost anywhere, even as a Python noob. Plus you get a description of what they all do (it’s the same text that pops up as a tooltip in the GUI). You might find this list of commands particularly handy, it includes all of the available readers, writers, sources, filters & animation cues – more than you’ll ever need.įor each one, you get the names of the various parameters for that command, really useful when the parameter name is slightly different to the one used in the GUI. Trace is awesome – but once you start to get more comfortable with using Python commands, the API documentation starts to come into it’s own. Trace can also be a useful way to surface additional commands to extend your basic scripts (as opposed to starting from scratch every time). I like to remove any mis-steps or intermediate renders to speed things up a bit & add a few variables to make it easier to tweak. You can use the output as-is, or tweak it as you see fit (especially as your Python skillz improve). Voilà – a Python script to automate your post-processing, without needing any real Python knowledge – super-useful. When you’re done, click Tools > Stop Trace & up pops a “trace” of all the Python commands needed to repeat your steps. Open ParaView, click Tools > Start Trace (accept the defaults) and then do whatever you need to do in the GUI. If you’re the same, fear not, we have a secret weapon – Trace. I can just about patch something together, but I’m no Pythonista. My Python skillz are almost non-existent. Good for prototyping and debugging scripts that then go into pvbatch.īack to the questions – how do I write a Python script to do my post-pro, especially if I’m not familiar with Python? Trace If you want to use the Python API directly in a terminal (rather than using a script) then this is a great tool. pvpython – the interactive version of the above.Feed it your Python script & let it get on with it ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |