This document lists learnings from explorations and prototyping of MDAnalysis GSoC 2025 - Project 4: Better interfacing of Blender and MDAnalysis
-
Viewport rendering uses opengl (
bpy.ops.render.openglis the call)-
opengl context is not setup in the background (
-b) mode, which is the same when using thebpymodule in headless mode -
The only way to get a viewport rendering (or anything opengl related) in background mode is to save the file and launch it with Blender in the regular GUI mode and run a script (with the
-Pparameter) to generate the render output- Blender can be launched with the
--no-window-focusparam to not show up in the foreground and-p 0 0 0 0to set the window parameters to minimum
- Blender can be launched with the
-
-
To ensure the script runs after the file is loaded,
bpy.app.handlers.load_posthandler has to be used