Blender_bevy_components_workflow icon indicating copy to clipboard operation
Blender_bevy_components_workflow copied to clipboard

Saving with auto export destructively removes empty nodes from scene

Open DylanRJohnston opened this issue 11 months ago • 8 comments

When saving with the auto export plugin, empty nodes are destructively removed from the scene (cannot be recovered with undo) and the script produces the following error.

Traceback (most recent call last):
  File "/Users/dylanj/Library/Application Support/Blender/4.0/scripts/addons/gltf_auto_export/auto_export/auto_export.py", line 116, in auto_export
    export_main_scene(bpy.data.scenes[scene_name], folder_path, addon_prefs, library_collections)
  File "/Users/dylanj/Library/Application Support/Blender/4.0/scripts/addons/gltf_auto_export/auto_export/export_main_scenes.py", line 57, in export_main_scene
    generate_and_export(
  File "/Users/dylanj/Library/Application Support/Blender/4.0/scripts/addons/gltf_auto_export/helpers/generate_and_export.py", line 57, in generate_and_export
    bpy.ops.object.mode_set( mode = original_mode )
  File "/Applications/Blender.app/Contents/Resources/4.0/scripts/modules/bpy/ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() Context missing active object

I've been trying to used empty nodes to mark spawn point and camera positions, but they get destroyed upon save. Turning them into blueprints works but produces an extra glb file that needs to be requested over the network on load and is extra work for one off markers.

DylanRJohnston avatar Feb 29 '24 04:02 DylanRJohnston