If like most rigs you have a master bind skeleton, select it's root, then run something like this to select any joint and mesh data under it, you may need to shift select your skin, the key is to get what you want selected and nothing else:
import maya.cmds as cmds meshes=[] joints=cmds.ls(sl=True) #find all joints joints.extend(cmds.listRelatives(type='joint',allDescendents=True)) #find your Skinned Geo for skin in cmds.listConnections(joints,type='skinCluster'): if skin: shape=cmds.skinCluster(skin,query=True,geometry=True) meshTransform=cmds.listRelatives(shape,parent=True)[0] if meshTransform not in meshes: meshes.append(meshTransform) cmds.select(joints,meshes)
Right, now you have the nodes you actually want to go through for export. I should point out here that this only works from Maya2010 onwards, there was an FBX bug in older versions of the export selected.
Here's the key, in the FBX output options (use fbs not fbx_dae) you need to go to the Animation Options block and make sure that these 2 flags are set.
Bake-Animations = ON, InputConnections= OFF
That's it. You should end up with a nice clean fbx with JUST the data you wanted in it.
Hi - can you explain a little more about why those two options specifically?
ReplyDelete