Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_export.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_export.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_export.py b/io_scene_gltf2/blender/exp/gltf2_blender_export.py
index 6d9ab8bb..2989ec31 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_export.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_export.py
@@ -30,7 +30,8 @@ from io_scene_gltf2.io.exp.gltf2_io_user_extensions import export_user_extension
def save(context, export_settings):
"""Start the glTF 2.0 export and saves to content either to a .gltf or .glb file."""
if bpy.context.active_object is not None:
- bpy.ops.object.mode_set(mode='OBJECT')
+ if bpy.context.active_object.mode != "OBJECT": # For linked object, you can't force OBJECT mode
+ bpy.ops.object.mode_set(mode='OBJECT')
original_frame = bpy.context.scene.frame_current
if not export_settings['gltf_current_frame']: