rs.Command("_-ViewCapturetoFile " + "_Width=" + str(w) + " _Height=" + str(h) + " _Scale=1 _TransparentBackground=_" + str(t) + " " + capture_file_name)
Trying to batch view capture through rhino command, I’ve tried and the file will only autosave when this line of code runs, and will not autosave after I comment this line out.
Save file name ( Unit=pixels Width=1853 Height=546 Scale=1 LockAspectRatio=No DrawGrid=No DrawWorldAxes=No DrawCPlaneAxes=No ScaleDrawing=No TransparentBackground=Yes NumberOfPasses=500 Browse ): _Width=4000.0
Save file name ( Unit=pixels Width=4000 Height=546 Scale=1 LockAspectRatio=No DrawGrid=No DrawWorldAxes=No DrawCPlaneAxes=No ScaleDrawing=No TransparentBackground=Yes NumberOfPasses=500 Browse ): _Height=2000.0
Save file name ( Unit=pixels Width=4000 Height=2000 Scale=1 LockAspectRatio=No DrawGrid=No DrawWorldAxes=No DrawCPlaneAxes=No ScaleDrawing=No TransparentBackground=Yes NumberOfPasses=500 Browse ): _Scale=1
Save file name ( Unit=pixels Width=4000 Height=2000 Scale=1 LockAspectRatio=No DrawGrid=No DrawWorldAxes=No DrawCPlaneAxes=No ScaleDrawing=No TransparentBackground=Yes NumberOfPasses=500 Browse ): _TransparentBackground=_Yes
Save file name ( Unit=pixels Width=4000 Height=2000 Scale=1 LockAspectRatio=No DrawGrid=No DrawWorldAxes=No DrawCPlaneAxes=No ScaleDrawing=No TransparentBackground=Yes NumberOfPasses=500 Browse ): "C:\Users\21648\Desktop\test_21e1-3.png"
Autosaving file as C:\Users\21648\AppData\Local\McNeel\Rhinoceros\6.0\AutoSave\test (199726)
RhinoAutosave.3dm
Autosave succeeded
Autosaving file as C:\Users\21648\AppData\Local\McNeel\Rhinoceros\6.0\AutoSave\test (199726)
RhinoAutosave.3dm
Autosave succeeded
Image successfully saved as C:\Users\21648\Desktop\test_21e1-3.png
You can see the the file will autosave twice before (or during?) the image saving action is carried out.
This is a batch view capture script I adapted from a script example on rhino official website and has been working no problem in R5, I’m worried that the autosave twice will significantly affect performance of this script when ran on much bigger files (100mb+). I couldn’t figure out why autosave is triggered let alone twice in a row, no matter how frequent I run the script, any idea?
I plan to use ETO to rewrite the setting input and perhaps it will help? I have no idea.
Thank you in advance!