On Wednesday, June 12, 2013 3:49:44 PM UTC-7, Geordie Martinez 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 <[email protected]>
> 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 [email protected].
>
>
> To post to this group, send email to [email protected].
>
> For more options, visit https://groups.google.com/groups/opt_out.
The reason you get that result is that you have not deleted history. Delete
history and run the command and you will not get the sub meshes. (see below)
--
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 [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.