移動先: 概要 戻り値 関連項目. フラグ. Python 例.

概要

curveOnSurface( string , [append=boolean], [degree=float], [knot=float], [periodic=boolean], [positionUV=[float, float]], [replace=boolean])

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

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

curveOnSurface コマンドを使用すると、CV(control vertice)のリストから新規のカーブ オンサーフェスが作成されます。新規作成されたカーブ オンサーフェスへのパス名を含む文字列が返されます。 「-r/replace」フラグを使用すると、既存のカーブを置き換えることができます。「-a/append」フラグを使用すると、ポイントを既存のカーブ オンサーフェスにアペンドできます。 カーブ アトリビュートの照会方法について説明した Curve コマンドも参照してください。

戻り値

string- 新しいカーブ オンサーフェスの名前

関連項目

curve

フラグ

append, degree, knot, periodic, positionUV, replace
ロング ネーム(ショート ネーム) 引数型 プロパティ
degree(d) float create
新規カーブの次数。デフォルトは 3 です。目に見えるカーブ スパンを作成するには、次数に 1 を足した数のカーブ ポイントが必要です。たとえば、3 次カーブには、4 個のポイントを配置する必要があります。
replace(r) boolean create
既存のカーブ全体を置き換えます。 このフラグを使用する場合、置き換えるカーブの名前をコマンドの最後に指定する必要があります(以下の例を参照)。
append(a) boolean create
既存のカーブの端にポイントをアペンドします。 このフラグを使用する場合、アペンドするカーブの名前をコマンドの最後に指定する必要があります (以下の例を参照)。
positionUV(uv) [float, float] createmultiuse
ポイントの UV の位置。
knot(k) float createmultiuse
ノット ベクトルにあるノットの値。ノット値ごとに 1 フラグ。(numberOfPoints+次数-1)個のノットが必要で、ノット ベクトルは非減少型である必要があります。
periodic(per) boolean create
オンの場合、周期的なカーブを作成します。デフォルトはオフです。

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

Python 例

import maya.cmds as cmds

cmds.curveOnSurface( 'surface1', d=3, uv=((0, 0),(0.3, 0.5), (0.5, 0.6), (0.9, 1.0)) )
# This command creates a curve-on-surface of degree three with
# four control vertices on surface1.

cmds.curveOnSurface( 'surface1', uv=((0, 0), (0.3, 0.5), (0.5, 0.6), (0.7, 0.8), (1.0, 1.0)), k=(0, 0, 0, 1, 2, 2, 2) )
# This command creates a curve-on-surface with five CVs
# and a knot vector, on surface1. Notice that there must be
# (number of CVs + degree - 1) knots and that the knot
# vector must be non-decreasing.

cmds.curveOnSurface( 'surface1', degree=3, per=True, uv=((0, 0), (0.2, 0.6), (0.4, 0.7), (0.9, 0.9), (0.0, 0.0), (0.2, 0.6), (0.4, 0.7)), k=(-2, -1, 0, 1, 2, 3, 4, 5, 6) )
# This command creates a closed (or "periodic") curve-on-surface with
# four distinct CVs. You must specify a knot vector when the
# "-per" flag is on. Notice that the first "degree" points
# are the same as the last "degree" points (ie. the first three
# points are the same as the last three points). Notice also
# that the knot spacing between the first "degree" knots must
# be the same as the spacing between the last "degree" knots
# (ie. the space between the 1st and 2nd knots is the same as
# the space between the 7th and 8th knots, and the space between
# the 2nd and 3rd knots is the same as the space between the
# 8th and 9th knots). There must be space between the first
# "degree" knots, unlike the previous example, where the first
# "degree" knots are the same.

cmds.curveOnSurface( 'surface1->curve1', append=True, uv=(1.0, 1.0) )
# This command appends a point to an existing curve-on-surface.
# Notice that the curve-on-surface is specified, not just the surface.

cmds.curveOnSurface( 'surface1->curve1', replace=True, d=1, uv=((1.0, 1.0), (2.0, 2.0)) )
# This command replaces an existing curve, surface1->curve1, with a
# new curve of degree 1 having the given points. Do not use this
# flag on a curve that is a result of a construction history operation.