Maya 2020 fundamentals - modelling the real world
Get halfway through a model and find it's an unworkable mess? Can't add edge loops where you need them? Can't subdivide a mesh properly? If any of this sounds familiar check this course out.
# 1 25-05-2018 , 04:12 AM
Registered User
Join Date: Sep 2017
Posts: 3

maya script to delete hidden objects

Hi all,
Please tell if anyone have some script to delete hidden objects at once..
Thanks

# 2 03-09-2020 , 02:11 PM
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)

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads