Skip to content

jonathanleang/blendToFbxExporterForUnity

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

blendToFbxExporterForUnity

Created by Krzysztof Żarczyński (@iamsed) on 16.11.15. http://blog.kzarczynski.com/2015/11/wanted-to-use-unity-cloud-build-but-all-my-blender-models-disappeared-solution/

The script exports multiple files from Blender into fbx models. It searches the path recursively and creates .fbx files next to the .blend files, then it renames corresponding Unity *.blend.meta files to *.fbx.meta to keep editor references, then it deletes the .blend files (make your own backup somewhere outside of the project path).

This script uses custom version of Unity-BlenderToFBX.py that Unity uses internally for importing .blend files. It has been changed to allow passing arguments to it and to load the necessary .blend file.

You can find the original file at [Unity path]\Editor\Data\Tools\Unity-BlenderToFBX.py

You need Blender to be installed on your machine. You need to specify the following command line arguments: Blender's directory, path to args-Unity-BlenderToFBX.py, input directory (with blend files)

Sample usage:

blender --background --python "E:\blendToFbxExporterForUnity\blendToFbxExporter.py" -- "E:\blendToFbxExporterForUnity\args-Unity-BlenderToFBX.py" "E:\NewUnityProject\Assets"

it deletes the .blend files so make a backup

/Applications/Blender2.83.4.app/Contents/MacOS/Blender --background --python "/Users/jonaathan/Documents/GitHub/blendToFbxExporterForUnity/blendToFbxExporter.py" -- "/Users/jonaathan/Documents/GitHub/blendToFbxExporterForUnity/args-Unity-BlenderToFBX.py" "/Users/jonaathan/Desktop/models/"

doesn't delete .blend anymore

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%