Page MenuHome

FBX Import Addon: Allow batch importing multiple files at once
ClosedPublic

Authored by Ian Munsie (DarkStarSword) on Sep 21 2019, 7:46 AM.

Details

Summary

This adds support to the FBX import addon to import multiple files at time by adding the OperatorFileListElement CollectionProperty to the import operator.

Diff Detail

Event Timeline

Brecht Van Lommel (brecht) added inline comments.
io_scene_fbx/__init__.py
242

This will make it return the value from the last file.

Instead, if any file successfully finished importing, this function should return FINISHED.

CANCELLED means no operation was performed at all, so that should only be returned if the operator ended up making no changes to the scene.

Incorporated comments from review - if at least one mesh successfully imports the addon will return {'FINISHED'}, but if no meshes are imported it will return {'CANCELLED'}

Ian Munsie (DarkStarSword) marked an inline comment as done.

Will now work regardless of whether the files property has been filled in or not, so that it will work as before if called from a script rather than invoked from the UI.

This revision is now accepted and ready to land.Oct 3 2019, 3:22 PM