yep, you need both checks as there can be regular shape with no
deformation which you don't want to delete.
On 2010.11.17 20:43, Christian Akesson wrote:
Not sure if it is overkill to do both, but this seems to do that trick
and get rid of what you want to get rid of regardless if the mesh is
deformed or not...
for m in meshes:
if not m.isReferenced():
shapes = m.getShapes()
for s in shapes:
if s.intermediateObject.get():
if not s.listConnections():
delete(s)
rename(m.getShape(), '%sShape' % m.name <http://m.name>())
/Christian
--
Viktoras
www.neglostyti.com
--
http://groups.google.com/group/python_inside_maya