ジャンプ先: 概要. 戻り値. キーワード. 関連. フラグ. Python 例.

概要

createDisplayLayer([empty=boolean], [makeCurrent=boolean], [name=string], [noRecurse=boolean], [number=int])

注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。

createDisplayLayer は、取り消し可能、照会不可能、および編集不可能です。

新しいディスプレイ レイヤを作成します。ディスプレイ レイヤには、ディスプレイ レイヤのグローバル パラメータの基準インデックス番号より大きい、まだ割り当てられていない最初の番号が割り当てられます。通常、すべてのオブジェクトとその子孫が新規のディスプレイ レイヤに追加されますが、「-nr」フラグを指定するとオブジェクトのみが追加されます。

戻り値

string作成したディスプレイ レイヤ ノードの名前

キーワード

displayLayer, display, layer, color, playback, render

関連

editDisplayLayerGlobals, editDisplayLayerMembers, layerButton

フラグ

empty, makeCurrent, name, noRecurse, number
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
empty(e) boolean create
設定すると、空のディスプレイ レイヤが作成されます。つまり、選択項目は新しいディスプレイ レイヤに追加されません。
makeCurrent(mc) boolean create
設定すると、新しいディスプレイ レイヤが現在のレイヤになります。
name(n) string create
作成する新しいディスプレイ レイヤの名前
noRecurse(nr) boolean create
設定すると、選択したオブジェクトのみがディスプレイ レイヤに追加されます。それ以外の場合は、選択したオブジェクトのすべての子孫も追加されます。
number(num) int create
作成する新しいディスプレイ レイヤの番号

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。

Python 例

import maya.cmds as cmds

#    Create a sphere.
#
objectArray = cmds.sphere()

#    Select the sphere.
#
cmds.select( objectArray[0] )

#    Create a layer. The selected object will be placed
#    in this layer. Note in this case both the nurbsSphere
#    and nurbsSphere shape are placed in the layer.
#
cmds.createDisplayLayer()

#    Create a cone.
#
objectArray = cmds.cone()

#    Select the cone.
#
cmds.select( objectArray[0] )

#    Create a layer but only put the nurbsCone in the layer.
#    The nurbsConeShape will remain in the default layer
#    as a result of specifying the -nr/noRecurse flag.
#
#    Note also that you can specify the name of the layer
#    with the -n/name flag.
#

cmds.createDisplayLayer( noRecurse=True, name='ExampleLayer' )