`can u filter them by checking whether the intermediateObject attribute is set
to true?

 
 

Christian Akesson <[email protected]> hat am 17. November 2010 um 17:25
geschrieben:

> I guess this could be a way to go:
> m.listHistory(type='deformableShape') always returns 1 shape node if there
> is no active deformer on it and multiple when deformed....
> /Christian
>
>
> On Wed, Nov 17, 2010 at 8:04 AM, Christian Akesson
> <[email protected]>wrote:
>
> > Viktoras:
> > I want to remove the intermediate shape nodes, but only if the mesh is not
> > being deformed by any deformer in which case those are needed
> > (meshNameShapeOrig, sometimes meshNameShapeDeformed when referenced).
> > These intermediate shapes are sometimes retained on the mesh when
> > duplicating or delete history to get rid of deformers. They cause some
> > issues in our pipeline....
> >
> > Ofer:
> > The m.listHistory(type='deformer') does not work for me, tried it with a
> > combination of various arguments. Tried on both the shapes and the mesh
> > transform. Am I missing something?
> >
> > Thanks,
> > /Christian
> >
> >
> >
> > On Wed, Nov 17, 2010 at 4:19 AM, Ofer Koren <[email protected]> wrote:
> >
> >> you can specify a broader node type - 'deformer':
> >>
> >> if m.listHistory(type='deformer'):
> >>     ...
> >>
> >> - Ofer
> >> www.mrbroken.com
> >>
> >>
> >>
> >> On Tue, Nov 16, 2010 at 11:20 PM, Christian Akesson
> >> <[email protected]> wrote:
> >> > Making a utility method to clean out duplicate shape nodes and I want to
> >> > check if a mesh is being deformed.
> >> > Instead of the if not m.listHistory(type='skinCluster'): I would love if
> >> > there was a way to check if there is any deformer type on the mesh....
> >> > ______________________________________________
> >> > for m in meshes:
> >> > # Filter out bound meshes
> >> > if not m.listHistory(type='skinCluster'):
> >> > shapes = m.getShapes()
> >> > for s in shapes:
> >> > if s.intermediateObject.get():
> >> > delete(s)
> >> > rename(m.getShape(), '%sShape' % m.name())
> >> > ________________________________________________
> >> > Thanks,
> >> > /Christian
> >> >
> >> > --
> >> > http://groups.google.com/group/python_inside_maya
> >>
> >> --
> >> http://groups.google.com/group/python_inside_maya
> >>
> >
> >
>
> --
> http://groups.google.com/group/python_inside_maya

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

Reply via email to