Skip to content
Snippets Groups Projects
Commit 044a574f authored by Julien Duroure's avatar Julien Duroure
Browse files

glTF importer: Fix bug adding armature when there is already an armature in anthoer scene

parent 9999dada
Branches
No related tags found
No related merge requests found
...@@ -48,6 +48,9 @@ class BlenderGlTF(): ...@@ -48,6 +48,9 @@ class BlenderGlTF():
threshold = 0.001 threshold = 0.001
for armobj in [obj for obj in bpy.data.objects if obj.type == "ARMATURE"]: 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 bpy.context.view_layer.objects.active = armobj
armature = armobj.data armature = armobj.data
bpy.ops.object.mode_set(mode="EDIT") bpy.ops.object.mode_set(mode="EDIT")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment