Similar to this post:
How to make the sequencer 'Preview' area fullscreen with python?
I am trying to have my script set the animation preview window to fullscreen without any other panels/menus:
I'm trying to figure out how to navigate the hierarchy of screens, areas, and workspaces and set just that panel on the 'Animation' properly. I'm often getting 'context is incorrect' run time errors or an error trying to set read-only object.
My script changes to the Animation screen:
# animation view
bpy.context.window.workspace = bpy.data.workspaces['Animation']
Changes the shading to rendered:
for area in bpy.data.screens['Animation'].areas:
for space in area.spaces:
if space.type == 'VIEW_3D':
space.shading.type = 'RENDERED'
And then tries to changes the screen to fullscreen:
# full screen
bpy.ops.screen.screen_full_area(use_hide_panels=True)
But, the panel does not go full screen unless I do it manually via the GUI.
I'm hoping there's a way to achieve this similar to the sequencer preview full screen example that will work on the animation preview window.
Adding an completely separate view - without affecting the existing 'Animation' would be even better.
UPDATE: Thanks @rjg for your involvement. Now, when the animation runs (via script that kicks off the full-screen animation preview window) the objects are animating but the textures/images are blank:
I'm using:
bpy.context.scene.frame_set(f)
bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
To do the animation playback after going full screen.