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

概要

pointOnSurface( [objects] , [constructionHistory=boolean], [normal=boolean], [normalizedNormal=boolean], [normalizedTangentU=boolean], [normalizedTangentV=boolean], [parameterU=float], [parameterV=float], [position=boolean], [tangentU=boolean], [tangentV=boolean], [turnOnPercentage=boolean])

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

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

サーフェス上のポイントの情報を返します。 フラグが指定されていない場合、このコマンドではデフォルトの p/position が指定されているものとみなされます。 複数のフラグを指定すると、文字配列を返します。

戻り値

float[3]
string

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

フラグ

constructionHistory, normal, normalizedNormal, normalizedTangentU, normalizedTangentV, parameterU, parameterV, position, tangentU, tangentV, turnOnPercentage
ロング ネーム(ショート ネーム) 引数型 プロパティ
parameterU(u) float queryedit
サーフェス上の U パラメータ値
デフォルト: 0
parameterV(v) float queryedit
サーフェス上の V パラメータ値
デフォルト: 0
turnOnPercentage(top) boolean queryedit
パラメータが正規化 (0,1) されているかどうか
デフォルト: false
position(p) boolean
サーフェス上で指定したポイントの位置(x,y,z)を返します。
normal(no) boolean
サーフェス上で指定したポイントの法線(x,y,z)を返します。
normalizedNormal(nn) boolean
サーフェス上で指定したポイントの正規化された法線(x,y,z)を返します。
tangentU(tu) boolean
サーフェス上で指定したポイントの U 接線(x,y,z)を返します。
normalizedTangentU(ntu) boolean
サーフェス上で指定したポイントの正規化 U 接線(x,y,z)を返します。
tangentV(tv) boolean
サーフェス上で指定したポイントの V 接線(x,y,z)を返します。
normalizedTangentV(ntv) boolean
サーフェス上で指定したポイントの正規化された V 接線(x,y,z)を返します。
一般的なフラグ
constructionHistory(ch) boolean create
コンストラクション ヒストリをオンまたはオフにします。

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

Python 例

import maya.cmds as cmds

cmds.pointOnSurface( 'surface1', u=0.5, v=1.0, position=True )
# Returns the (x,y,z) position of the surface at parameter (u=0.5,v=1.0).

infoNode = cmds.pointOnSurface('surface1', ch= True, u=0.55, v=0.33)
cmds.getAttr(infoNode + ".position" )  # returns the position
# The pointOnSurface command returns  a string which is the name of
# a new pointOnSurfaceInfo dependency node.  With this node connected
# to the surface, the output values of the pointOnSurfaceInfo node
# are always current even if, for example, the surface parameters are
# being animated.