If shape has two parent transforms it must be an instance right?
import maya.cmds as cmds
sphere = cmds.polySphere()
cmds.instance(sphere)
getShape = cmds.listRelatives(sphere, shapes=True)
parents = cmds.listRelatives(getShape[0], allParents=True)
if len(parents) > 1:
print getShape[0], "is an instance"
RyanT
Technical Artist
www.rtrowbridge.com/blog
NaughtyDog Inc.
On Mar 12, 4:21 pm, yury nedelin <[email protected]> wrote:
> hi this is not really python specific but
>
> what i a nice way to tell if object is an instance with mel/python?
>
> Yury
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---