Closed isarandi closed 2 years ago
Apparently this is not a Mayavi-specific issue, but probably something to do with Gnome (and potentially X).
Hi @isarandi, do you know how to close the GUI? I want to save 40000 pictures. If I open GUI everytime, the cost is high.
You may find the offscreen option a bit more helpful if it works for you. See https://mayavi.readthedocs.io/en/latest/tips.html#avoiding-the-rendering-window
Mayavi works very well to generate video animations. I'm using
mlab.animate
andmlab.screenshot
to animate and save the frames.My problem is, if I want to generate a high-res 1080 visualization, but my actual screen is smaller than 1920x1080. Even if I specify
(1920, 1080)
as thesize
argument tomlab.figure()
, the window ends up as a "maximized" window. I don't mean a full-screen application, but "maximized" as if I press the "square-icon" button next to the close button on a window. This, however, results in lower than 1920x1080 resolution. After this, I can resize the window manually by dragging the corner of the window, but it's hard to get it pixel-perfectly to 1920x1080.Is there a way to avoid the Mayavi window snapping to "maximize" at the beginning? I tried
fig.scene.renderer.render_window.set(full_screen=False)
but that didn't make any difference, as it seems to be about actual full-screen where the entire screen shows the mayavi content, not about the "maximization" of the window.Using pyvirtualdisplay is indeed a workaround but then GPU hardware acceleration is lost and the rendering is much slower.
Environment: