
# because there may be two nodes with the same name (in this # -l/long flag when listing nodes without any filter. # One thing to note is that it is better to always use the # List all geometry, lights and cameras in the DAG.Ĭmds.ls( geometry=True, lights=True, cameras=True ) # List all selected objects named "group*" # To list all instances of sphere1, use the -ap/allPaths flag. # instanced, the command below lists only the first instance.

# Note that there are two objects named circle1 # create some objects to operate on and select them all. Nodes such as the sharedReferenceNode and unknown reference nodes.įlag can appear in Create mode of commandįlag can have multiple arguments, passed either as a tuple or a list. When set to false, this command will only lookįor matches in namespaces that are requested (e.g. When set to true, this command will look for name matches If -dag is also specified or if an object name isįlattens the returned list of objects so that each component This flag is a modifier and mustīe used in conjunction with the -dag flag. Passed to the command then this flag will list all Dag objects List components that are currently hilited for pre-selection. List objects that are currently hilited for component selection. List objects that are currently selected. When this flag is set only object names will be returned and List the type of each object after its name. This flag cannot be used in conjunction with the -type flag. List all objects of the specified type, but not objects that areĭescendents of that type. This flag cannot be used in conjunction with the -exactType flag. Object/data type associated with them and will return "untyped" Note: some selection items in Maya do not have a specific This flag is the same type name returned from the -showTypeįlag. Returned from the end of the list of items. Returned can be greater than this amount. If multiple type flags are specified then the number of items Note: each type flag will return at most this many items so Returned from the beginning of the list of items. This flag specifies the maximum number of elements to be Will be interleaved with object names so the result will beįlags allPaths, assemblies, cameras, dagObjects, dependencyNodes, exactType, flatten, geometry, ghost, head, hilite, intermediateObjects, invisible, leaf, lights, live, long, materials, noIntermediate, nodeTypes, objectsOnly, partitions, planes, preSelectHilite, readOnly, recursive, references, renderGlobals, renderQualities, renderResolutions, renderSetups, selection, sets, shapes, shortNames, showType, tail, templated, textures, transforms, type, untemplated, visible Long name (short name) If type names are requested, using the -showType flag, they Objects when used in conjunction with the -selection flag. Scene but it can also be used to filter or list the selected Match objects based on their name (using wildcards) or based on theirīy default ls will match any object in the

The most common use of ls is to filter or Optionally the type names) of objects in the scene. Ls is undoable, NOT queryable, and NOT editable.
