擅长:python、mysql、java
<p>使用<code>filterExpand</code>并将<code>selectionMask</code>标志设置为<code>31</code>来返回所有选定对象中的多边形顶点组件,这对您的用例可能很有用。在</p>
<p>以下是一个简单的示例(带一些注释):
选择不同种类的对象和组件进行尝试。在</p>
<pre><code>import maya.cmds as cmds
# Will return EVERYTHING selected
all_selected = cmds.ls(sl=True)
# Will filter out and return just the verts
# from everything selected
just_the_selected_verts = cmds.filterExpand(sm=31)
</code></pre>
<p>检查<a href="http://download.autodesk.com/us/maya/2011help/CommandsPython/filterExpand.html" rel="nofollow">docs here</a>中的filterExpand。在</p>