Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This script will export SELECTED animated Maya objects and camera into .comp files containing animated transforms that that you can then import in BlackMagic Fusion. (The transforms must be animated, not just constrained. If they are constrained, bake them first.)
Fusion is currently able to import alembic files via its UI, but it can not be done via a Lua or Python command. This script fixes that flaw.
Written by Mike McReynolds at Filmworks FX (11/7/2017). Tested in Maya 2016.5 For questions, comments, PayPal donations: email@example.com :)
How to use: Source this script (or just copy into a maya script editor and execute). Then run FusionExporter()
If you want to call this script from another scirpt, you can also supply filenames to FusionExporter as follows: FusionExporter(CameraFileName="C:/MyCameraFile.comp",ObjectFileName="C:/MyObjectFile.comp"). This will cause the script to export to those files, skipping the file dialog boxes.
Once the script finishes, load the .comp files into your existing comp via script. Here's a python snippet for importing .comp files: