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

概要

cylinder([axis=[float, float, float]], [caching=boolean], [constructionHistory=boolean], [degree=int], [endSweep=angle], [heightRatio=float], [name=string], [nodeState=int], [object=boolean], [pivot=[float, float, float]], [polygon=int], [radius=linear], [sections=int], [spans=int], [startSweep=angle], [tolerance=linear], [useTolerance=boolean])

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

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

cylinder コマンドを使うと、新しいシリンダやシリンダを作成するディペンデンシー ノードが作成され、その名前が返されます。

戻り値

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

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

関連項目

cone, nurbsCube, nurbsPlane, sphere, torus

フラグ

axis, caching, constructionHistory, degree, endSweep, heightRatio, name, nodeState, object, pivot, polygon, radius, sections, spans, startSweep, tolerance, useTolerance
ロング ネーム(ショート ネーム) 引数型 プロパティ
radius(r) linear createqueryedit
オブジェクトの半径です。
デフォルト: 1.0
startSweep(ssw) angle createqueryedit
回転サーフェスの開始角度です。
デフォルト: 0
endSweep(esw) angle createqueryedit
回転サーフェスが終了角度。 デフォルトは 2πラジアン(360 度)です。
デフォルト: 6.2831853
useTolerance(ut) boolean createqueryedit
指定したしきい値を使用して解像度を決定します。 指定されていない場合は、セクション数が使用されます。
デフォルト: false
degree(d) int createqueryedit
作成されるサーフェスの次数です。 1 - 一次、 3 - 三次
デフォルト: 3
sections(s) int createqueryedit
セクション数によって、サーフェスのスイープ方向の解像度が決まります。 useTolerance が false の場合のみに使用されます。
デフォルト: 8
spans(nsp) int createqueryedit
スパン数によって、サーフェスの逆方向の解像度が決まります。
デフォルト: 1
tolerance(tol) linear createqueryedit
サーフェスの構築で使用するしきい値です。 useTolerance が true の場合のみに使用されます。
デフォルト: 0.01
heightRatio(hr) float createqueryedit
「高さ」と「幅」の比率です。
デフォルト: 2.0
pivot(p) [float, float, float] createqueryedit
プリミティブのピボット ポイントです。
axis(ax) [float, float, float] createqueryedit
プリミティブの軸です。
高度なフラグ
caching(cch) boolean createqueryedit
ノード キャッシング モードを修正します。詳細については、ノードの説明を参照してください。
: 上級ユーザ向けの機能です。
nodeState(nds) int createqueryedit
ノード状態を修正します。詳細については、ノードの説明を参照してください。
: 上級ユーザ向けの機能です。
一般的なフラグ
name(n) string create
作成されたオブジェクトに名前を付けます。
constructionHistory(ch) boolean create
コンストラクション ヒストリをオンまたはオフにします。
object(o) boolean create
結果のオブジェクト、またはディペンデンシー ノードのみを作成します。
polygon(po) int create
この引数の値は、この操作で作成されるオブジェクトの タイプを制御します。
  • 0: NURBS サーフェス
  • 1: ポリゴン(nurbsToPolygonsPref を使用して変換用のパラメータを設定)
  • 2: サブディビジョン サーフェス(nurbsToSubdivPref を使用して変換用のパラメータを設定)
  • 3: ベジェ サーフェス
  • 4: サブディビジョン サーフェス ソリッド (変換のためのパラメータを設定するには、nurbsToSubdivPref を使用)

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

Python の例

import maya.cmds as cmds

cmds.cylinder()
cmds.cylinder( ch=True, radius=10, hr=3 )
cmds.cylinder( r=5, axis=(1, 1, 1), pivot=(0, 0, 1), ssw='0deg', esw='90deg' )
cmds.cylinder( ut=True, tol=0.01 )

#Query the radius of the selected cylinder
r = cmds.cylinder( q=True, r=True )