sorry getShape() will only get the first shape. use getChildren()

On Wed, Jun 12, 2013 at 3:49 PM, Geordie Martinez <geordiemarti...@gmail.com
> wrote:

> Pymel will help you for sure.
> if you have the transform you can use getShape() and it will return a list
> of shape nodes underneath.
>
> import pymel.core as pm
>
> theTransform = pm.PyNode("nameOfYourObject")
> shapes = theTransform.getChildren()
>
> [nt.Mesh(u'pSphereShape1'), nt.Mesh(u'pSphereShape2')]
>
> you can limit it to polygon shapenodes too with the type="mesh" kwarg.
>
> shapes = theTransform.getChildren(type="mesh")
>
>
>
>
>
> On Wed, Jun 12, 2013 at 3:25 PM, Christian Akesson <
> cakes...@dslextreme.com> wrote:
>
>> Does anyone know how to get the submeshes of a polygon mesh.
>> Combine two spheres into a single mesh and each sphere will be a submesh.
>>
>> I've been searching the docs and Google, but have not been able to find
>> anything.
>> Anyone know if PyMel has anything for this anywhere?
>>
>> Thanks,
>> /Christian
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to python_inside_maya+unsubscr...@googlegroups.com.
>> To post to this group, send email to python_inside_maya@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To post to this group, send email to python_inside_maya@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to