pymel.core.general.editDisplayLayerMembers

editDisplayLayerMembers(*args, **kwargs)

This command is used to query and edit membership of display layers. No equivalent ‘remove’ command is necessary since all objects must be in exactly one display layer. Removing an object from a layer can be accomplished by adding it to a different layer.

Flags:
Long name (short name) Argument Types Properties
fullNames (fn) bool ../../../_images/query.gif
 

(Query only.) If set then return the full DAG paths of the objects in the layer. Otherwise return just the name of the object.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

noRecurse (nr) bool ../../../_images/create.gif ../../../_images/query.gif
 
If set then only add selected objects to the display layer. Otherwise all descendants of the selected objects will also be added.

Derived from mel command maya.cmds.editDisplayLayerMembers

Example:

import pymel.core as pm

import maya.cmds as cmds

pm.editDisplayLayerMembers( 'displayLayer1', 'sphere1', 'cone1' )
# Result : 2
pm.editDisplayLayerMembers( 'displayLayer1', query=True )
# Result : sphere1 cone1
pm.editDisplayLayerMembers( 'displayLayer1', 'expression1', 'sphere2' )
# Warning : Only DAG objects can be in a display layer.  'expression1' ignored.
# Result : 1

Previous topic

pymel.core.general.editDisplayLayerGlobals

Next topic

pymel.core.general.encodeString

Core

Core Modules

Other Modules

This Page