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

概要

reverseSurface( surface , [caching=boolean], [constructionHistory=boolean], [direction=int], [name=string], [nodeState=int], [object=boolean], [replaceOriginal=boolean])

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

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

サーフェスの一方向または両方向を反転するか、 U 方向と V 方向を入れ替える(サーフェス法線を反転する効果)場合に 使用できます。新しく反転したサーフェスの名前、および 作成されたディペンデンシーノード名が返されます。反転したサーフェスのパラメータ範囲は、オリジナルのサーフェスと同じです。

このコマンドは、選択したサーフェスのアイソパラムも処理します。選択したアイソパラムについて、アイソパラム カーブが操作後に反転されるところを想像してみてください。たとえば、reverseSurface surface.v[0.1] は U 方向に反転します。

戻り値

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

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

フラグ

caching, constructionHistory, direction, name, nodeState, object, replaceOriginal
ロング ネーム(ショート ネーム) 引数型 プロパティ
direction(d) int createqueryedit
サーフェスを反転する方向です。 0 - U、 1 - V、 2 - U と V の両方、 3 - 入れ替え。
デフォルト: 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.reverseSurface( 'surface1', ch=True, d=0 )
cmds.reverseSurface( 'surface1.v[0.1]', ch=True )
# Reverses surface1 with construction history in the U direction.
# The name of the new surface and the name of the new dependency node
# are returned.

cmds.reverseSurface( 'surface1', ch=False, rpo=True, d=1 )
cmds.reverseSurface( 'surface1.u[0.1]', ch=True )
# Reverses surface1 without history, with replace original on,
# in the V direction.  Because the "-rpo" flag is on, the name of
# the original surface is returned as well as the new dependency node.
# The reversed surface will <em>replace</em> the original surface.

cmds.reverseSurface( 'surface1', ch=False, rpo=True, d=2 )
# Reverses surface1 without history, with replace original on,
# in both the U and V directions.

cmds.reverseSurface( 'surface1', ch=False, rpo=True, d=3 )
# Swaps the U and V directions of surface1 with history, with replace
# original on.  This has the effect of reversing the surface normal.