Re: [Maya-Python] Wildcard to filter out some controllers from current selections

2018-10-06 Thread Andres Weber
The solution I'm going to suggest is probably a bit too brute force as it would be not using a lib for quicker or more elegant comparisons however something like: filtered = [selected for selected in selection if all([exclusion not in selected for exclusion in exclusions])] That would very

Re: [Maya-Python] Wildcard to filter out some controllers from current selections

2018-10-06 Thread Justin Israel
On Sat, Oct 6, 2018, 10:57 AM kiteh wrote: > Hi all, > > I am trying to filter some controllers from current selections. > Currently this is the code I had: > exclude_list = [ > "main_global_ctrl", > "main_globalOffset_ctrl", > "main_path_ctrl", > "main_start_ctrl" > ] > > >

[Maya-Python] Wildcard to filter out some controllers from current selections

2018-10-05 Thread kiteh
Hi all, I am trying to filter some controllers from current selections. Currently this is the code I had: exclude_list = [ "main_global_ctrl", "main_globalOffset_ctrl", "main_path_ctrl", "main_start_ctrl" ] exclude_ctrls = [] all_ctrls = cmds.ls(selection=True, long=True) for