Query if mesh is a deformable object [python / mel]

hello,

Does somebody know how you can check if a mesh is deformable or not with python / mel ?
When creating caches it freaks out if I add meshes that are not deformed.
But I don’t know how to filter them out in an easy way.

Can you do a query in maya to see if a mesh is deformed ?

Thanks !

RuntimeError: Error occurred during execution of MEL script
file: /usr/autodesk/maya2015-x64/scripts/others/createHistorySwitch.mel line 63: No deformable objects selected.

cheers,
Sven

Look no further than the code in createHistorySwitch.mel that determines whether deformable shapes are selected:

string $isDeformable[] = `ls -type deformableShape $shape`;
if (0 == size($isDeformable)) {
	string $rels[] = `listRelatives -path -shapes -noIntermediate $shape`;
	$isDeformable = `ls -type deformableShape $rels`;
	if (0 == size($isDeformable)) {
		error((uiRes("m_createHistorySwitch.kNonDeformableError")));
	}
}

ah yes, that was indeed a good move ! :slight_smile: thank for the reminder.

Great, thanks capper, I am gonna test this tomorrow !