View Full Version : Viewport redraws inside "with redraw off"
05-23-2007, 12:38 PM
I have quite a large exporter for the game I am working on and it fully works in MAXScript. Now to speed things up, I have put the code that starts the whole thing inside with redraw off(), so that the viewport is not updated during exporting. I am moving the slider around a lot during exporting, so this really saves some 80% of the time needed to export a level. Now the oddity is that at a specific point in my code is this line:
If this line is executed, then the viewport is redraw all the time. If I delete that line or if the line is never called, then the viewport is not redrawn. That seems quite odd to me and I have not been able to find any work around or something to get around it.
What can I do to solve this? (If no one knows a real solution, than getting position and rotation information from a node without having to change the slidertime might do the trick as well.)
Thanks in advance!
05-23-2007, 01:03 PM
instead of using your 'with redraw off()'.... try this:
05-23-2007, 02:45 PM
Yes, I expected that to work, so I already tried them and they did not solve it either, unfortunately.
(If no one knows a real solution, than getting position and rotation information from a node without having to change the slidertime might do the trick as well.)
at time X print $.pos -- where X is the queried frame number
05-24-2007, 12:25 PM
Wow, that really increased the speed of my exporter! At time is also faster when with redraw off would have worked, because the slider itself is always updated. Thanks!
Glad to hear it worked out well for you.
05-24-2007, 08:53 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.