Select Maya 中具有特定前缀的对象 Python

Select objects with certain prefix in maya with Python

我想 select 所有具有特定前缀的对象。

大纲截图:

我找到的唯一方法是 select 所有灯,但我只想将具有此前缀的灯附加到我的数组中。

我现在拥有的是: selectionLights = cmds.ls(类型=['aiAreaLight']) lights.extend(selectionLights)

如果有人能帮助我,那就太好了!

由于 python 命令的工作方式与 mel 命令很相似,因此它应该像这样工作:

cmds.ls("PainterLight*")