also, note that you don't even need the explicit isInstanced test -
you can just do:

cube = PyNode("pCube2|pCubeShape1")
print cube.getOtherInstances()

If it isn't instanced, it just returns an empty list.

- Paul

On Fri, Mar 27, 2009 at 5:59 AM, Paul Molodowitch <[email protected]> wrote:
> Pymel is way ahead of 'ya... ;)
>
> Try this:
>
> cube = PyNode("pCube2|pCubeShape1")
> if cube.isInstanced():
>   print cube.getOtherInstances()
>
> - Paul
>
> On Fri, Mar 27, 2009 at 1:18 AM, King <[email protected]> wrote:
>>
>> I am using pymel-0.9RC4.
>>
>> Do we have "isInstance", "instanceOf" command in pymel way.
>>
>> For example "pCube1|pCubeShape1" is the first object and "pCube2|
>> pCubeShape1" is the instance of first one.
>>
>> if (isInstance("pCube2|pCubeShape1")):
>>    print instanceOf("pCube2|pCubeShape1")
>>
>> would return "pCube1|pCubeShape1"
>>
>> Cheers
>>
>> Prashant
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to