Yep, it's not "obvious". My notes are here:
http://mayamel.tiddlyspot.com/#%5B%5BHow%20can%20I%20query%20what%20is%20highlighted%20in%20the%20Shape%20Editor%3F%5D%5D
I use pymel simply because it makes optionVars convenient.
Snip:
import pymel.core as pm
selData = [item for item in
pm.optionVar["blendShapeEditorTreeViewSelection"] if item][0].split("/")
bsIndices = []
for item in selData:
if not item:
continue
bsNode, index = item.split(".")
bsIndices.append((bsNode, int(index)))
print bsIndices
[(u'blendA', 0), (u'blendA', 1), (u'blendA', 2), (u'blendB', 0)]
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/bb502a46-82aa-4ff5-8fc3-b1667a8e6aaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.