Blender doesnt support the ASCII format. Thats fine, i just change the setting to binary.
However, when I call the importer from script, it reverts back to the ascii format. How to overcome this?
Hi @topitsky ,
Unfortunately, it is not currently possible to change the export settings with the public API, they will always use the defaults. There is an issue logged for this.
A workaround would be to make the necessary API public by modifying the source code locally. Here are the steps:
First you will need a copy of the package source code. This can be taken from GitHub: GitHub - Unity-Technologies/com.unity.formats.fbx: FBX Exporter tools for editing and exchanging assets between the Unity and Digital Content Creation (DCC) tools such as Maya and 3DS Max
Alternatively can also make a copy of the downloaded package:
- In the Unity Project view, under “Packages”, select the FBX Exporter.
- Right click and select “Show in Explorer” to find the downloaded package location.
- Copy the com.unity.formats.fbx folder to a new location
- In Unity remove the FBX exporter package from the Package Manager
- In the Package Manager use the “+” button in the top left corner to add the copied package from disk
Then in the copied com.unity.formats.fbx package, in Editor/FbxExporter.cs search for ExportObject(s) and
find the ones that take export settings as an argument and change them from internal to public.
You may also need to make other classes related to the export settings public as well.
I’ll just wait for you to make this available in the public api, cant see any reason why it shouldnt be