Hey all.
I've been playing with the "grabviewport" script the Xoliul shader guys have on their site and I came across a problem I figured I'd try and fix, only I'm having no luck finding an answer to a maxscript issue.
In their grabviewport script, it calls ResizeViewPort (a function of theirs that sets the viewport size to whatever you typed in the size box in the dialogue) and then calls gw.getViewportDib which actually grabs the viewport.
But annoyingly, the image grabbed is actually not correctly lit, because in "realism" viewport mode, the lighting takes a short time to settle down as the exposure control kicks in.
So I figure there are two options. Either insert some kind of wait/yield for the time between resizing the view and capturing the dib, or alternatively using a callback to handle when the exposure has converged and is ready to present the final viewport with final light values.
Anyone got any ideas on how either of those might be done? I cant find any "wait" methods in the maxscript docs, or anything that does a callback for the viewport that indicates a final state of it.
Obviously if I fix this, I'll release the fix to the guys who shared the script. I guess my other option of course is to NOT resize the viewport and just grab it as its current size. Might add that as an option.
Replies
sounds about right...
Edit: Oops, looks like Nysuatro beat me to it