When exporting rigs and animations done in Autodesk Maya to Unreal Engine or Unity, any custom deform nodes or constraints are unable to normally be exported. This became apparent with my experience in Death Bloom and Kitty City, when animators used custom rigs that they were used to, as they were not used to building rigs for game development. So, I created a tool, called CreateCompatibilityRig, which does the following:
Allows the user to specificy components of the source rig
Duplicates the entire joint structure and skinned mesh
Creates position and rotation constraints from the source joints to the new joints
Below is the code for the tool, which can be loaded into Maya and run with the ‘run()’ function. This opens a QT window, which is Maya’s GUI interface, and all of the user interaction is through buttons and text fields.