However this breaks all future standard exports. When I tried exporting a selection as an FBX it would not work correctly until I closed and reopened Maya. I’m looking for a less tedious solution if possible.
YES! thanks a bunch I believe I have figured out the proper method now.
in addition to this file export I also need to select the proper objects that are not normally selected when simply clicking on the animLayer. This is how it was done.
targetLayer = "your_selected_animLayer"
export_filepath = "C:/Users/person/Desktop/testFolder/testing01"
cmds.select(clear=True)
cmds.animLayer(targetLayer, e=True, writeBlendnodeDestinations=True)
layerCurves = cmds.animLayer(targetLayer, q=True, animCurves=True)
layerBlendNodes = cmds.animLayer(targetLayer, q=True, blendNodes=True)
cmds.select(targetLayer, add=True, noExpand=True)
for c in layerCurves:
cmds.select(c, add=True)
for blendNode in layerBlendNodes:
cmds.select(blendNode, add=True)
cmds.file(export_filepath + '.mb', type="mayaBinary", exportSelected=True, channels=False, constructionHistory=False, expressions=False, constraints=False)
print("Success!!")
I still need to do some more testing but I got a good feeling about this