glTF-Blender-IO
glTF-Blender-IO copied to clipboard
Exporting a specific scene using python
Is your feature request related to a problem? Please describe. When invoking glTF export programmatically from an operator (e.g. via a button click) doesn't allow to change the active scene.
E.g. setting window.scene
does not have an effect since currently the blender glTF exporter uses bpy.context.scene
which is a readonly property.
Describe the solution you'd like One of the following:
- Use the operator context which would allow to be overridden instead of
bpy.context.scene
- Allow passing in a scene name (or scene index) to be exported to the exporter
- Use
window.scene
instead ofbpy.context.scene
Additional context This is an issue when trying to export multiple scenes/glTF files from blender (but not all scenes in a blend file)