移動先: 概要 戻り値 フラグ. Python 例.
detachSurface(
surface
, [caching=boolean], [constructionHistory=boolean], [direction=int], [keep=boolean], [name=string], [nodeState=int], [object=boolean], [parameter=float], [replaceOriginal=boolean])
注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
detachSurface は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。
パラメータ値と方向のリストに従って、サーフェスが断片にデタッチされます。「-k」フラグを使用すると、保存する断片と破棄する断片を指定できます。
戻り値は、新しくデタッチされたサーフェスの名前です。コンストラクション ヒストリがオンの場合は、作成されるディペンデンシー ノード名も返されます。
1 回の detachSurface 操作では、U か V のどちらか、または両方でデタッチできます。
このコマンドを使用すると、特定パラメータ値で閉じたサーフェスを開くことができます。このコマンドは、「-p」フラグを 1 つだけ指定して使用できます。
「-k」フラグを指定する場合は、「-k」フラグを 1 つかすべて指定するか、まったく指定しない必要があります。「-k」フラグをすべて指定する場合は、「-p」フラグより「-k」フラグを 1 つ多くする必要があります。
戻り値の型は照会モードでは照会フラグが基になります。
caching, constructionHistory, direction, keep, name, nodeState, object, parameter, replaceOriginal
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: タプルまたはリストとして渡された複数の引数を持てるフラグ
|
import maya.cmds as cmds
cmds.detachSurface( 'surface1', ch=True, d=1, p=0.3, rpo=False )
cmds.detachSurface( 'surface1.u[0.3]', ch=True )
# Detaches surface1 into two pieces at u = 0.3.
# The results are two surface pieces, and a detachSurface dependency node.
# Since no "-keep" flag is used, all pieces are kept.
cmds.detachSurface( 'surface1', ch=True, k=(1,0), rpo=False, p=0.34, d=0 )
cmds.detachSurface( 'surface1.v[0.34]', ch=True, k=(1,0), rpo=False )
# Detaches surface1 at v = 0.34. Because of the "k" flags, two
# surfaces are created but the second surface is empty. A
# detachSurface dependency node is also returned.
cmds.detachSurface( 'surface1', ch=True, rpo=True, p=(0.2, 0.5), d=1 )
cmds.detachSurface( 'surface1.u[0.2]', 'surface1.u[0.5]', ch=True, rpo=True )
# Detaches surface1 into three pieces. Because of the "-rpo" flag,
# the first surface piece is used to replace the original surface1.
# The results are the three surfaces (including the original surface).
# Even though the "ch" flag is on, a dependency node is not created
# if surface1 is not a result of construction history. If surface1
# is the result of construction history, then a dependency node is
# created and its name is returned.
cmds.detachSurface( 'cylinder1', ch=True, d=0, p=0.3, rpo=False )
# Detaches cylinder1, which is periodic in V, where the V parameter
# ranges between 0.0 and 8.0. The parameter, 0.3, is used to move
# the start point of the cylinder, also known as the "seam".
# The resulting surface's V parameter range is 0.0 to 0.3.
cmds.detachSurface( 'cylinder1', ch=True, d=0, p=(0.3, 0.7), rpo=False )
# Detaches cylinder1, which is periodic in V, where the V parameter
# ranges between 0.0 and 8.0. The 1st parameter, 0.3, is used to move
# the start point of the cylinder, also known as the "seam".
# The second parameter, 0.7, is used to detach the cylinder again.
# The result is only TWO surfaces; the first surface's V parameter ranges
# from 0.0 to 0.3. The second surface's V parameter ranges from 0.3 to 0.7.