Simple Question: Select all except


#1

Hey, guys.

Simple question here: How do I make an exception using MEL scripting? I mean… I want to select all cameras except “persp” cam.

Thanks!


#2

This will select all the cameras but the perspective

select -r top;
select -add side;
select - add front;


#3
# Exception List
excepcion_list = ['persp']
# All Camera Transforms
cams_Trans = [cmds.listRelatives(x, p=1)[0] for x in cmds.ls(type='camera')]
# Filter only the Cams you want
cams_TransFiltered = [x for x in cams_Trans if x not in excepcion_list]
# Select
cmds.select( cams_TransFiltered, r=1)