[Bf-extensions-cvs] [044a574f] master: glTF importer: Fix bug adding armature when there is already an armature in anthoer scene
Julien Duroure
noreply at git.blender.org
Fri Mar 1 06:53:48 CET 2019
Commit: 044a574f371b51ce1084f393426517709998ccb0
Author: Julien Duroure
Date: Fri Mar 1 06:53:14 2019 +0100
Branches: master
https://developer.blender.org/rBA044a574f371b51ce1084f393426517709998ccb0
glTF importer: Fix bug adding armature when there is already an armature in anthoer scene
===================================================================
M io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
===================================================================
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
index 637cd72f..0df29b94 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
@@ -48,6 +48,9 @@ class BlenderGlTF():
threshold = 0.001
for armobj in [obj for obj in bpy.data.objects if obj.type == "ARMATURE"]:
+ # Take into account only armature from this scene
+ if armobj.name not in bpy.context.view_layer.objects:
+ continue
bpy.context.view_layer.objects.active = armobj
armature = armobj.data
bpy.ops.object.mode_set(mode="EDIT")
More information about the Bf-extensions-cvs
mailing list