How to retrieve lights from the selected nodes?
The quick answer is as below: from pymel import * filter( lambda n: 'light' in n.classification(), ls(sl=True, dag=True, leaf=True)) In pymel’s google group, there are 2 people giving different opinions for this and the following are from their post: take out the ‘sl=True’ by using pymel’s “selected()” function by Ofer Koren from pymel import * filter( lambda n: 'light' in n.classification(), selected(dag=True, leaf=True)) Doing it through the API requires more code but is considerably faster by Dean Edmonds ...