ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.
polyContourProjection([caching=boolean], [constructionHistory=boolean], [createNewMap=boolean], [flipRails=boolean], [insertBeforeDeformers=boolean], [method=int], [name=string], [nodeState=int], [offset0=linear], [offset1=linear], [offset2=linear], [offset3=linear], [reduceShear=float], [smoothness0=float], [smoothness1=float], [smoothness2=float], [smoothness3=float], [userDefinedCorners=boolean], [uvSetName=string], [worldSpace=boolean])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
polyContourProjection は、取り消し可能、照会可能、および編集可能です。
オブジェクトに輪郭ストレッチ UV 投影を実行します。
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
polyClipboard, polyCylindricalProjection, polyEditUV, polyForceUV, polyMapCut, polyMapDel, polyMapSew, polyMoveFacetUV, polyMoveUV, polyPlanarProjection, polyProjection, polySphericalProjection, polyUVSet, untangleUV
caching, constructionHistory, createNewMap, flipRails, insertBeforeDeformers, method, name, nodeState, offset0, offset1, offset2, offset3, reduceShear, smoothness0, smoothness1, smoothness2, smoothness3, userDefinedCorners, uvSetName, worldSpace
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。
|
import maya.cmds as cmds
# Create a plane.
cmds.polyPlane( n='plane', sx=10, sy=10 )
# Deform the plane and planar project UVs onto it.
cmds.softMod( 'plane', falloffRadius=1 )
cmds.move( 0, 0, -0.5, r=True, os=True, wd=True )
cmds.select( 'plane', r=True )
cmds.delete( 'plane', ch=True )
cmds.polyProjection( 'plane.f[0:99]', ch=1, type='Planar', ibd=0, md='y' )
# Create a lambert node.
cmds.shadingNode( 'lambert', n='myLambert', asShader=True )
cmds.sets( renderable=True, noSurfaceShader=True, empty=True, name='myLambertSG' )
cmds.connectAttr( 'myLambert.outColor', 'myLambertSG.surfaceShader', f=True )
# Create a texture checker.
cmds.shadingNode( 'checker', asTexture=True )
cmds.shadingNode( 'place2dTexture', asUtility=True )
cmds.connectAttr( 'place2dTexture1.outUV', 'checker1.uv' )
cmds.setAttr( 'place2dTexture1.repeatU', 4 )
cmds.setAttr( 'place2dTexture1.repeatV', 4 )
# Assign the texture the the lambert node.
cmds.connectAttr( 'checker1.outColor', 'myLambert.color', f=True )
# Set the textured display mode.
currentPanel = cmds.getPanel(withFocus= True)
if currentPanel != '':
cmds.modelEditor(currentPanel, edit=True, da='smoothShaded', displayTextures=True, dl='default')
# Assign the lambert shader to the plane.
cmds.sets('plane', edit=True, forceElement= 'myLambertSG' )
# Use the contour stretch projection to assign 'rectangular' UVs to a strip of faces
cmds.polyContourProjection( 'plane.f[30:69]', ch=1, m=0 )