Nice one. Never knew you would wildcard in ls, especially not with attribute names. I'll give this a go. Thanks!
On Thursday, 7 February 2013 20:45:59 UTC, Carlos Rico wrote: > You may add an attribute to the required nodes and list objects that have > this attribute only. Add "yourCustomAttribute" to the required nodes and > list only objects that have that attribute. Could be a possible solution I > think. Cheers. > > > > ex: > > import maya.cmds as cmd > specific_nodes = cmd.ls('*.yourCustomAttribute',objectsOnly=True) > cmd.select(specific_nodes) > > > > 2013/2/7 Marcus Ottosson <konstr...@gmail.com> > > > import maya.cmds as cmd > > specific_nodes = cmd.ls(et='objectSet') > > > > That command would list all objectSets in the scene and it would do so very > quickly compared to the time it would take to do this in a scene with > hundreds of thousands of nodes: (psuedo-code) > > > > specific_nodes = [] > > for node in cmd.ls(): > > if isinstance(node, objectSet): > > specific_nodes.append(node) > > > > So, the question. Is there a way to "tag" or otherwise specify that certain > nodes are different that would allow such a quick search to take place? Other > than creating a new nodetype via the api. > > > > Best, > > Marcus > > > > -- > > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email to python_inside_maya+unsubscr...@googlegroups.com. > > To post to this group, send email to python_in...@googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > > -- > Carlos Rico Adega > Maya Generalist > > > ------------------------------------- > LinkedIn > > > carlos....@gmail.com -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To post to this group, send email to python_inside_maya@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.