Fix #140942: FBX importer fails when using file browser recursive option

The `files` property, provided by the blender file browser, contain
paths relative to the `directory` property. Use that instead of using
the file's parent directory.

Pull Request: https://projects.blender.org/blender/blender/pulls/141575
This commit is contained in:
Guillermo Venegas
2025-07-07 23:24:26 +02:00
committed by Jesse Yurkovich
parent 0ce5738415
commit 2cf0c63461

View File

@@ -215,9 +215,8 @@ class ImportFBX(bpy.types.Operator, ImportHelper):
if self.files:
ret = {'CANCELLED'}
dirname = os.path.dirname(self.filepath)
for file in self.files:
path = os.path.join(dirname, file.name)
path = os.path.join(self.directory, file.name)
if import_fbx.load(self, context, filepath=path, **keywords) == {'FINISHED'}:
ret = {'FINISHED'}
return ret