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

概要

pointOnCurve( [objects] , [constructionHistory=boolean], [curvatureCenter=boolean], [curvatureRadius=boolean], [normal=boolean], [normalizedNormal=boolean], [normalizedTangent=boolean], [parameter=float], [position=boolean], [tangent=boolean], [turnOnPercentage=boolean])

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

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

NURBS カーブ上のポイントの情報を返します。 フラグが指定されていない場合、デフォルトの p/position が指定されているものとみなされます。

戻り値

float[3]
float
string

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

フラグ

constructionHistory, curvatureCenter, curvatureRadius, normal, normalizedNormal, normalizedTangent, parameter, position, tangent, turnOnPercentage
ロング ネーム(ショート ネーム) 引数型 プロパティ
parameter(pr) float queryedit
カーブ上のパラメータ値
デフォルト: 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)を返します。
tangent(t) boolean
カーブ上で指定したポイントの接線(x,y,z)を返します。
normalizedTangent(nt) boolean
カーブ上で指定したポイントの正規化された接線(x,y,z)を返します。
curvatureCenter(cc) boolean
カーブ上で指定したポイントの曲率の中心(x,y,z)を返します。
curvatureRadius(cr) boolean
カーブ上で指定したポイントの曲率の半径を返します。
一般的なフラグ
constructionHistory(ch) boolean create
コンストラクション ヒストリをオンまたはオフにします。

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

Python 例

import maya.cmds as cmds

cmds.pointOnCurve( 'curve1', pr=0.5, p=True )
# Returns the (x,y,z) position of curve1 at parameter 0.5.

cmds.pointOnCurve( 'curve1', pr=0.5 )
# Returns the (x,y,z) position of curve1 at parameter 0.5, since
# position is the default information.

cmds.pointOnCurve( 'curve1', pr=0.5, nn=True )
# Returns the (x,y,z) normalized normal of curve1 at parameter 0.5.

cmds.pointOnCurve( 'curve1', pr=0.5, cr=True )
# Returns the curvature radius of curve1 at parameter 0.5.

infoNode = cmds.pointOnCurve('curve1', ch=True, pr=0.55)
cmds.getAttr(infoNode + ".position")  # returns the position
cmds.getAttr(infoNode + ".normal")    # returns the normal

# Returns a string which is the name of a new pointOnCurveInfo
# dependency node.  With this node connected to the curve,
# the output values of the pointOnCurveInfo node are always current
# even if, for example, the parameter is being animated.