2 notes:

1) If you're not already aware, there's a new version of pymel up -
0.9.0.  You can grab it from highend3d.  If you were already aware,
and wanted to keep with the 0.7.x branch for compatability, carry
on... ;)

2) If you just want a list of all the meshes in your scene, accounting
for all the possible instanced paths, try:

ls(type='mesh', allPaths=True )


On Mon, Mar 23, 2009 at 12:43 PM, Justin Ball <[email protected]> wrote:
>
> I am having trouble using this command.
>
> I seem not to be prepping the info for the isInstanced() command
> properly.  Could someone give me a hand?
>
> Here is just some test code that I am trying to get to respond
> properly.
>
> snip--
>
> from pymel import *
>
>
> for x in ls(type='mesh'):
>    select(x, add=1) #select them
>    print "Name: " + x
>    print "stripNameSpace: " + x.stripNamespace()
>    print "PyNode: " + PyNode(x)
>    try:
>        a = x.stripNamespace()
>        a.isInstanced()
>        print "Strip TRUE"
>        print a
>    except:
>        pass
>    try:
>        p = PyNode(x)
>        p.isInstanced()
>        print "PyNode TRUE"
>    except:
>        pass
>
>
>
> print "Exit"
>
>
> --snip
>
> I have tried with both with 0.7.9 and 0.7.10 with still no luck.
>
> What I am trying to do is get the transform information of all the
> objects in a scene.  And if I have instanced geo, I need to get it's
> proper transform info in world space since the local space information
> does not provide the additional transform for the group in instanced
> geometry.  If someone has a better way of doing this, I am all ears.
>
> Thank you!
>
>
> >
>

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

Reply via email to