you can try the "listAliases()" method which will
give you a list of tuples with the name of the blendshape geom and the
weight attr it is driving on the blendshape node:

example: I just made a sphere with 3 blendshapes called frown smile and
furrow:

geom = pm.PyNode("someGeometryName")
blends = geom.getShape().inputs(type='blendShape')
blends[0].listAliases()

# Result: [(u'frown', Attribute(u'blendShape.weight[0]')),
 (u'smile', Attribute(u'blendShape.weight[1]')),
 (u'furrow', Attribute(u'blendShape.weight[2]'))] #






On Mon, Jul 14, 2014 at 10:22 AM, Kenneth Ibrahim <kenibra...@gmail.com>
wrote:

> Using PyMEL I'm able to access the list of blendShape targets as follows
> given that 'bs_node' is a reference to the blendShape object:
>
> bs_node.getTarget()
>
> This returns the list of names of the targets as expected but only while
> the original target geometry objects are still connected to the blendShape
> node. If I delete all of the targets the 'getTarget' method returns an
> empty list though the blendShape node itself has a 'weight' parent
> attribute which still has the names of the original targets and their
> values.
>
> What is the best way in PyMEL to poll this list of target names on the
> blendShape node if the original target meshes no longer exist?
>
> Thx!
>
> --
> "God is a metaphor for a mystery that absolutely transcends all human
> categories of thought. It's as simple as that!" - Joseph Campbell
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAP_aC5Yogs6WdXCmhCbAFjTnMuY6S7QQnasbR%3DKsOkZBUkCt0A%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CAP_aC5Yogs6WdXCmhCbAFjTnMuY6S7QQnasbR%3DKsOkZBUkCt0A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CABPXW4jy4mJaEfyCNfv4F6jTbuo%2BkyNC550gMD2P3m2mS%2BsPxw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to