I’m currently working on a modo script for exporting a “clean” FBX file from modo for use in Unity. By clean, I mean a file that only contains mesh items. When using an FBX in Unity exported from modo, you’ll want to remove the camera, lights, materials and locators as well as constraints. I’ve been working on a Perl script that will remove all of the unnecessary items from your scene before exporting an FBX from modo. The script will also revert the scene back to it’s last saved state for convenience.
I’m by no means a coding expert when it comes to scripts for modo. However, I find the Command History panel in the modo UI to be an invaluable resource when finding information on what commands I’ll have available when writing a script. The Command History not only shows a full list of modo commands, but also their syntax usage, which is very handy.
In my current script, I needed to find a way to deselect mesh items. I wasn’t sure how to do this, so after looking through the Command History, I found that the command “selection.subItem” would do the trick. In the following image, you can see a screen shot of the Command History panel and specifically the “selection.subItem” command.
If you’re thinking about writing a script for modo, the Command History panel is a good place to find all of the commands you’ll use in your script as well as their syntax. I’ll be posting my ExportToUnity script here on the blog as soon as it’s complete.