type='dagNode' is exactly what I wanted, didn't think of using dagNode as a type.
Thanks. assemblies (which I hadn't even seen before) only returns top-level dags, which is more restricting than what I was after. On Thursday, October 11, 2012 12:57:06 AM UTC-7, owen burgess wrote: > > Or this: > > cmds.ls(selection=True, type = "dagNode") > > O > > On 11 October 2012 07:52, Justin Israel <[email protected] <javascript:> > > wrote: > >> How about this? >> >> cmds.ls(sl=True, assemblies=True) >> >> >> >> On Oct 10, 2012, at 6:07 PM, Jesse Capper <[email protected]<javascript:>> >> wrote: >> >> Is there a way to only return selected DAG nodes through maya.cmds? The >> -dag flag of cmds.ls also returns children of any selected DAG nodes >> which isn't what I want. Or is the only option to filter the selection list >> with something like [i for i in cmds.ls(sl=True, l=True) if >> i.startswith('|')] or getting the intersection of cmds.ls(sl=True) and >> cmds.ls(sl=True, dag=True) or something along those lines? >> >> -- >> view archives: http://groups.google.com/group/python_inside_maya >> change your subscription settings: >> http://groups.google.com/group/python_inside_maya/subscribe >> >> -- >> view archives: http://groups.google.com/group/python_inside_maya >> change your subscription settings: >> http://groups.google.com/group/python_inside_maya/subscribe >> > > -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
