Fixing Blender to import FBX

Fixing Blender to import FBX

There has been a weird problem with Blender for several years now regarding importing FBX files, even with the newest version (4.1). For some FBX files, especially those where meshes are simultaneously skinned to the armature and part of the armature hierarchy, Blender throws an error.

So, the thing is in the import_fbx.py file which is stored in:

C:\Program Files\Blender Foundation\Blender 3.3\3.3\scripts\addons\io_scene_fbx\
C:\Program Files\Blender Foundation\Blender 4.1\4.1\scripts\addons\io_scene_fbx\

More specifically, in this function (it could be on a different line depending on the Blender version):

def find_armature_bones(self, armature):
    for child in self.children:
        if child.is_bone:
            child.armature = armature
            child.find_armature_bones(armature)

You need to change it to (just remove one tabulation step from the last line):

def find_armature_bones(self, armature):
    for child in self.children:
        if child.is_bone:
            child.armature = armature
        child.find_armature_bones(armature)

And importing will correctly work after blender restart.

I’m attaching corrected files just in case:

p.s.: it was discovered by Jed Lang and described here.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *