[Closed] can Render command do viewports?
Wow, so looks like it is a refresh problem of some sort. First off, if your render is something more complex than a box, it works fine without the message boxes. If you place sleeps of 0.1 (which I had already done), it still fails on a fast scene. But sleeps of 0.2 works. Looks like if the render isn’t slowed down using a sleep or by it being a slow render, then max gets confused.
This looks like pretty nasty code, I hate stuff where I just hope it will work in many cases, rather than being assured it will work. But I may have to use it.
- Neil
Thanks, but it didn’t help any. Sounds like it should
Ok, I’ve simplified my script…
max tool maximize
viewport.activeViewport = 1
max tool maximize
viewport.activeViewport = 1
render vfb:on
max tool maximize
viewport.activeViewport = 1
max tool maximize
viewport.activeViewport = 1
Start with a scene with 4 views and a simple object, If you evaluate the script several times, sometimes it will return you to the 4 viewports, sometimes it’ll return you to a single maximized viewport. Can someone try this say 20 times and see if it’s just my computer? If someone else can confirm it I’ll post it as a bug to adesk.
- Neil
confirmed – took a good couple of runs, but indeed it sometimes fails to get back to the state it was in before
maybe changing the viewport layout directly works better? (though I think it resets any custom viewport size adjustments)
Hi Neil,
I tried your latest script version and can confirm the unpredictable results on 3ds Max 9 x64. I also noticed an odd behaviour: the code runs well almost always if evaluated as is written, but fails always if enclosed in parenthesis, defined as a code block. For the same reason I guess it fails every time is evaluated from an external editor (PsPad in my case) through com.
- Enrico
Thanks Ze for confirming. And thanks for the extra info SyncViewS, I’ll post this all to an official bug to autodesk.
- Neil