glTF-Blender-IO icon indicating copy to clipboard operation
glTF-Blender-IO copied to clipboard

Exporting a specific scene using python

Open marwie opened this issue 7 months ago • 1 comments

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 of bpy.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)

marwie avatar Jul 02 '24 07:07 marwie