Skip to content

Instantly share code, notes, and snippets.

@hiroakit
Created August 2, 2015 11:57
Show Gist options
  • Save hiroakit/e5dea7433bbdcec26d95 to your computer and use it in GitHub Desktop.
Save hiroakit/e5dea7433bbdcec26d95 to your computer and use it in GitHub Desktop.
create polyplane, move, scale, rotate
import maya.cmds as cmds
cmds.polyPlane(n='myPlane1', sx=1, sy=1, w=1.0, h=1.0)
# 他にもこういったコマンドでオブジェクトを生成できる
# cmds.polyCube( n='myCube1', sx=1, sy=1, sz=1, w=1.0, h=1.0)
# cmds.polySphere(n='mySphere1', sx=1, sy=1, r=1.0)
# cmds.polyCylinder(n='myCylinder1', sx=1, sy=1, sz=1, h=1.0)
# 生成したオブジェクトを移動、拡大、回転させる
cmds.move( 5, 0, 0, 'myPlane1', r=True )
cmds.scale( 3, 3, 3, 'myPlane1')
cmds.rotate( '45deg', 0, 0, 'myPlane1', r=True ) # x, y, z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment