移動先: 概要 戻り値 フラグ. Python 例.

概要

closeSurface( [surface|surfaceIsoparm] , [blendBias=float], [blendKnotInsertion=boolean], [caching=boolean], [constructionHistory=boolean], [direction=int], [name=string], [nodeState=int], [object=boolean], [parameter=float], [preserveShape=int], [replaceOriginal=boolean])

注意: オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。

closeSurface は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。

closeSurface コマンドは U、V または両方向のサーフェスを閉じて周期サーフェスにします。閉じる方向は、direction フラグで制御されます。このコマンドでサーフェスが指定されていない場合、最初に選択したサーフェスが使用されます。

新しく閉じたサーフェスのパス名と作成されたディペンデンシー ノード名を返します。

このコマンドは、選択したサーフェスのアイソパラムも処理します。たとえば、アイソパラムが指定されていれば、surface1.u[0.33] で、direction フラグに関係なくサーフェスは V 方向に閉じられます。

戻り値

string[]オブジェクト名とノード名

戻り値の型は照会モードでは照会フラグが基になります。

フラグ

blendBias, blendKnotInsertion, caching, constructionHistory, direction, name, nodeState, object, parameter, preserveShape, replaceOriginal
ロング ネーム(ショート ネーム) 引数型 プロパティ
preserveShape(ps) int createqueryedit
0 - シェイプの保持なし 1 - シェイプを保持 2 - ブレンド
デフォルト: 1
blendBias(bb) float createqueryedit
ブレンド値に応じて 1 つめまたは 2 つめのサーフェスの方向に結果のオブジェクトを傾斜させて、0.5 より小さいまたは 0.5 より大きい範囲に収めます。
デフォルト: 0.5
blendKnotInsertion(bki) boolean createqueryedit
true に設定されている場合、少し異なるエフェクトを作成するため、オリジナル サーフェスの 1 つ(以下のパラメータ アトリビュートで指定される相対的な位置)にノットを挿入します。
デフォルト: false
parameter(p) float createqueryedit
新しく挿入されたノットの位置に関するパラメータ値です。
デフォルト: 0.1
direction(d) int createqueryedit
閉じる方向: 0 - U、 1 - V、 2 - U と V の両方。
デフォルト: 0
高度なフラグ
caching(cch) boolean createqueryedit
ノード キャッシング モードを修正します。詳細については、ノードの説明を参照してください。
: 上級ユーザ向けの機能です。
nodeState(nds) int createqueryedit
ノード状態を修正します。詳細については、ノードの説明を参照してください。
: 上級ユーザ向けの機能です。
一般的なフラグ
name(n) string create
作成されたオブジェクトに名前を付けます。
constructionHistory(ch) boolean create
コンストラクション ヒストリをオンまたはオフにします。
object(o) boolean create
結果のオブジェクト、またはディペンデンシー ノードのみを作成します。
replaceOriginal(rpo) boolean create
「同じ位置」に作成(つまり置き換え)します。

: コマンドの作成モードで使用可能なフラグ : コマンドの編集モードで使用可能なフラグ
: コマンドの照会モードで使用可能なフラグ : タプルまたはリストとして渡された複数の引数を持てるフラグ

Python 例

import maya.cmds as cmds

cmds.closeSurface( 'surface1', ch=True, d=0, ps=True )
# Closes surface1 in the U direction with history and by preserving shape.
# The name of the closed surface, and the name of the newly created
# dependency node are returned.

cmds.closeSurface( 'surface1', ch=True, d=2, ps=False )
# Closes surface1 in both U and V directions, with history.  Closing
# the surface will not preserve the shape of the surface.

cmds.closeSurface( 'surface1.u[0.66]', ch= True )
# Closes surface1 in the V direction, with history.  The direction is
# implied from the specified isoparm.