File > Save Last Draw bitmap / can a script access that?
cajhin
Posts: 154
Is it possible to get the draw buffer that is written by Menu > File > Save Last Draw,
or at least to trigger that save function from a script?
My script currently does [...].get3DViewport().captureImage(),
but this is not the same thing (tools overlays, render aspect ratio, ...)
Thanks for any insights
Comments
There are a couple of samples that may help you if you want the action:
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/actions/action_find_classname/start
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/actions/action_trigger/start
If you want the raw data for further processing I don't know if that is possible, other than by saving a file and then loading it back in.
Thanks Richard, once more I'm impressed by the breadth and depth of your knowledge (or your search skills - do you have a private search engine??)
Close, but no cigar. Triggering the action "DzSaveLastDrawAction" does not accept any parameters, so "save the draw pane to file, then load that file" always opens
"Save Image" dialog, where the user must navigate to the correct folder and save the temp file with the correct filename. Nope...
Well, it was worth a try.
Try http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/rendering/render_drawstyle/start
(these, by the way, come from Rob not me - though I do now recall some of the relevant samples without prompting.)
I know it's been a while so I don't know if you're still looking for your answer, but I found myself trying to to the same thing yesterday and your post nudged me in the right direction. So, if it helps:
I also encountered a couple of other issues, such as the menu icon overlapping the draw even with most things on auto-hide. To get around this, I grabbed the pane manager object, undocked the viewport pane and resized it taller than the aspect frame enough that the menu icon did not overlap. Also good for if you wanted a larger version of the draw; I use for Iray preview so pop out, resize, wait for draw and then save, and return everything to normal.
I did find grouped nodes had those annoying crosshairs, of course, so I also added a couple of steps to clear any selection and unparent anything under a group node before the draw and reparent them back again afterwards and restore the selection. Might find other steps are needed if you have any other things with indicators that hang around even when not selected.
Bit more of a pain than just triggering the Save Last Draw action, but it got me where I needed to be.