V-Ray framebuffer not a Maya window?

From time to time we end up with Maya windows off-screen due to monitor order/orientation change. This is a 100 year old problem here, without a solid solution… until, maybe now :wink:

This piece of MEL code successfully finds all Maya windows and moves them to coordinates 0,0 even in a multi-monitor setup:
for ($window in lsUI -windows) { window -e -tlc 0 0 $window ; }

However, it doesn’t manage to find the V-Ray framebuffer. Can the framebuffer be moved too somehow?

Credit for that piece of MEL goes to Keith Rogers.

The VFB is a Qt window; it is also registered as a dockable window in Maya. I don’t know how the lsUI command works; it is possible that it only handles windows created by Maya itself. You might have to use Qt-specific code to find the VFB.

Best regards,
Vlado

This code is not safe if some of the windows doesn’t exist for some reason.

Try this one, it has worked for me:


for ($window in `lsUI -windows`) {
    if (`window -q -exists $window`==0)
        continue;
    if (`window -q -mainWindow $window`!=0)
        continue;
    window -e -tlc 0 0 $window;
}

I thought this seemed odd …because my Qt windows move with that code but not the V-Ray 2.x frame buffer. Turns out that the V-Ray 3 frame buffer does indeed move with that code. But the V-Ray 2.x frame buffer does not.

VFB in 3.0 is now a Maya panel, so it can be docked.
In 2.0 it is just a QT window created manually (as Vlado mentioned), so the Maya APIs don’t know much about it.

Alright, well. We plan on moving onto V-Ray 3 soon anyways :wink: