You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: I am using python to automate exporting a number of GLTF files from various objects stored in different scenes in my .blend file. For each of the exports, my code uses context.temp_override(scene=...) to make the appropriate scene active, then invokes bpy.ops.export_scene.gltf(use_active_scene=True, ...).
After invoking bpy.ops.export_scene.gltf(), the currently active scene in the UI is changed to the scene that I passed into temp_override(). This is particularly annoying when I am in a workspace with a pinned scene, as the export changes which scene is pinned.
store_user_scene = bpy.context.scene
...
# restore user scene
bpy.context.window.scene = store_user_scene
Ideally the GLTF export ought to be using temp_override() itself instead of changing the context. But at least to ensure the export restores the same scene as was in the window beforehand, line 36 ought to be:
store_user_scene = bpy.context.window.scene
The text was updated successfully, but these errors were encountered:
Context: I am using python to automate exporting a number of GLTF files from various objects stored in different scenes in my .blend file. For each of the exports, my code uses
context.temp_override(scene=...)
to make the appropriate scene active, then invokesbpy.ops.export_scene.gltf(use_active_scene=True, ...)
.After invoking
bpy.ops.export_scene.gltf()
, the currently active scene in the UI is changed to the scene that I passed intotemp_override()
. This is particularly annoying when I am in a workspace with a pinned scene, as the export changes which scene is pinned.This seems to be due to: gltf2_blender_gather.py lines 36-48:
Ideally the GLTF export ought to be using
temp_override()
itself instead of changing the context. But at least to ensure the export restores the same scene as was in the window beforehand, line 36 ought to be:The text was updated successfully, but these errors were encountered: