Last active
March 2, 2016 15:45
-
-
Save selfsame/3c64cecd4c7e606b2fb7 to your computer and use it in GitHub Desktop.
fbx_dump.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy, os | |
| from random import randint | |
| file = bpy.data.filepath.split("\\")[-1:][0] | |
| print("#"+file) | |
| dump_path = "C:\\dump\\"+file+"\\" | |
| os.makedirs(dump_path) | |
| for s in bpy.data.scenes: | |
| print(" - scene: ", s.name) | |
| for o in s.objects: | |
| o.select = False | |
| for o in s.objects: | |
| print(" - object: ", o.name) | |
| o.select = True | |
| bpy.ops.export_scene.fbx(filepath=dump_path+ o.name + ".fbx", use_selection=True, use_metadata=False, apply_unit_scale=True, axis_forward="Y", axis_up="Z",version="ASCII6100", object_types={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH', 'OTHER'}, use_anim_optimize=True, ) | |
| o.select = False | |
| print("#FINE\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment