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

概要

polyNormalPerVertex([allLocked=boolean], [deformable=boolean], [freezeNormal=boolean], [normalX=float], [normalXYZ=[float, float, float]], [normalY=float], [normalZ=float], [relative=boolean], [unFreezeNormal=boolean])

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

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

法線(x, y, z)をポリゴン オブジェクトの頂点にコネクトします。 照会フラグと併用する場合、指定したコンポーネントにコネクトされた法線を返します。ただし照会すると、共有の有無に関係なく、頂点のすべての法線(すべての頂点とフェースの組み合わせ)を返します。

戻り値

boolean成功または失敗。

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

キーワード

poly, userNormals, polyNormals, setNormal, vertexNormal, vertex

関連項目

polyAverageNormal, polyNormal, polySetToFaceNormal, polySoftEdge

フラグ

allLocked, deformable, freezeNormal, normalX, normalXYZ, normalY, normalZ, relative, unFreezeNormal
ロング ネーム(ショート ネーム) 引数型 プロパティ
relative(rel) boolean createqueryedit
指定した法線の値を、カレント値を基準にして追加します。
normalX(x) float createqueryedit
法線の X 値を指定します。
normalY(y) float createqueryedit
法線の Y 値を指定します。
normalZ(z) float createqueryedit
法線の Z 値を指定します。
normalXYZ(xyz) [float, float, float] createqueryedit
法線の XYZ 値を指定します。
freezeNormal(fn) boolean createqueryedit
法線の値をカレント値でフリーズ(ロック)することを指定します。
unFreezeNormal(ufn) boolean createqueryedit
カレント値でフリーズしている法線の値をフリーズ解除(ロック解除)することを指定します。
allLocked(al) boolean createqueryedit
選択した頂点上のすべての法線がロックされている(フリーズされている)かどうかを照会します。
deformable(deformable) boolean createqueryedit
このフラグは現在サポートしていません(デフォルトは true)。このフラグは、次のリリースで削除予定です。

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

Python 例

import maya.cmds as cmds

# To set the xyz values of normals of selected vertices:
cmds.polyNormalPerVertex( xyz=(0.2, 0.3, 0.4) )
# To set just the "x" value of normal of selected vertices:
cmds.polyNormalPerVertex( x=.37 )
# To add to the current value of the "y" normal value of selected vertices:
cmds.polyNormalPerVertex( rel=True, y=.13 )
# To query the normal values on selected vertices - This returns all normals
# regardless of whether they are shared or not:
cmds.polyNormalPerVertex( query=True, xyz=True )
# To query if the normals on the selected vertices are locked or not
cmds.polyNormalPerVertex( query=True, freezeNormal=True )
# To query if all the normals on the selected vertices are locked or not
cmds.polyNormalPerVertex( query=True, allLocked=True )
# More examples
cmds.file( f=True, new=True )
cmds.polyCube()
cmds.select( 'pCube1.vtxFace[2][1]', r=True )
cmds.polyNormalPerVertex( query=True, freezeNormal=True )
# Result: 0 #
# Now, lock the normal of a VertexFace on the cube
cmds.select('pCube1.vtxFace[2][1]', r=True )
cmds.polyNormalPerVertex( xyz=(0.7071, 0, 0.7071) )
# Query if the normal is locked for this vertexFace
cmds.polyNormalPerVertex( query=True, freezeNormal=True )
# Result: 1 #
# Query if the normal is locked for all the normals on this vertex
# Should return 0, because there are some other normals on
# this vertex that are not locked.
cmds.select('pCube1.vtx[2]', r=True)
cmds.polyNormalPerVertex( query=True, allLocked=True )
# Result: 0 #