Shell scripting to save images
Posted: Thu Jun 04, 2020 1:42 pm
Hello,
For a project, we are making hundreds of models and would like to check each one visually. Instead of opening each one-by-one, I thought I would write a script that would loop through and load each model in the GUI, visualize it in a couple of different planes, saving each as a screenshot, then close the model, load the next one, and repeat. This way we could have all images stored in various planes for each model if we need to visualize them quickly. I found the "testvisuals.py" script example, which has been a good helpful base, but I'm stuck on a few functions.
My questions are:
1. What are functions for: saving a view as an image, and closing a model (or close all) -- similar to how loadModel() works?
2. In the example, "gfxWindowSendKey('x')" orients the view in the x direction, which is helpful for y and z -- but what about if you want to view in a -x, -y, or -z?
Otherwise, I think the loop construction and everything else will be simple given the script example.
Thanks,
Brett
For a project, we are making hundreds of models and would like to check each one visually. Instead of opening each one-by-one, I thought I would write a script that would loop through and load each model in the GUI, visualize it in a couple of different planes, saving each as a screenshot, then close the model, load the next one, and repeat. This way we could have all images stored in various planes for each model if we need to visualize them quickly. I found the "testvisuals.py" script example, which has been a good helpful base, but I'm stuck on a few functions.
My questions are:
1. What are functions for: saving a view as an image, and closing a model (or close all) -- similar to how loadModel() works?
2. In the example, "gfxWindowSendKey('x')" orients the view in the x direction, which is helpful for y and z -- but what about if you want to view in a -x, -y, or -z?
Otherwise, I think the loop construction and everything else will be simple given the script example.
Thanks,
Brett