Import FBX with python

How can I import a FBX file with Python?

if you want to open the import file dialogue you can do that with the ui class:

[url]https://www.derivative.ca/wiki088/index.php?title=UI_Class[/url]

You can point to a Geo COMP and use the importFBX() method:

derivative.ca/wiki088/index. … COMP_Class

We used it recently and it works well. Just keep track of the geometry you’re importing. In our case we were importing something with the same name, then deleting it, and reimporting it. This means we didn’t need to end up doing any file system cleanup of extra TOG files, but keep an eye on it if you’re continuously importing new geometry.

^^ Also with the importFBX() method you may have to end up scripting some deletion/cleanup of ops in your Touch network if you are re-importing multiple times to prevent weird reimport/duplicate issues. Likewise, depending on the scene the fbx was saved in the file will import with several layers you will have to weed through to get to the actual .tog file.

-Colin