Skip to content
Snippets Groups Projects
Commit 2b27ba8d authored by Bastien Montagne's avatar Bastien Montagne
Browse files

Fix T41245: FBX import error.

You can't swich hidden objects to Edit mode... :/
parent 21a8a582
No related branches found
No related tags found
No related merge requests found
......@@ -534,12 +534,15 @@ def blen_read_armatures(fbx_tmpl, armatures, fbx_bones_to_fake_object, scene, gl
# Switch to Edit mode.
scene.objects.active = bl_adata
is_hidden = bl_adata.hide
bl_adata.hide = False # Can't switch to Edit mode hidden objects...
bpy.ops.object.mode_set(mode='EDIT')
for b_uuid in bones:
blen_read_armatures_add_bone(bl_adata, bl_arm, bones, b_uuid, matrices, fbx_tmpl)
bpy.ops.object.mode_set(mode='OBJECT')
bl_adata.hide = is_hidden
# Bind armature to objects.
arm_mat_back = bl_adata.matrix_basis.copy()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment