View Single Post
03-09-2020, 02:11 PM   #2
Jackkd88
Registered User
 
Join Date: Sep 2020
Posts: 5
select text to view
Code:
import maya.cmds as mc

allTransforms = mc.ls(tr=1)
polyMeshes = mc.filterExpand(allTransforms, sm=12)
toDel = []
for i in polyMeshes:
    if mc.getAttr(i+'.visibility') != True:
        toDel.append(i)
mc.delete(toDel)
  Reply with quote