Last active
August 29, 2015 14:02
-
-
Save gregtemp/92a962f3f849db1605e5 to your computer and use it in GitHub Desktop.
Getting started in python in maya
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.cmds as cmds | |
cubeList = cmds.ls( 'myCube*' ) | |
if len(cubeList) > 1: | |
cmds.delete(cubeList) | |
result = cmds.polyCube (w=1, h=1, d=1, name='myCube#') | |
#print ('result:' + str(result)) | |
transformName = result[0] | |
for i in range( 0, 50): | |
instanceResult = cmds.instance( transformName, name = transformName + '_instance#') | |
#print( 'instanceResult:' + str(instanceResult)) | |
cmds.move( 0, i, 0, instanceResult) | |
#https://www.youtube.com/watch?v=eXFGeZZbMzQ | |
#https://www.youtube.com/watch?v=i8NDq1ciuGE | |
#maya mel - http://www.polyextrude.com/tutorials/MelScripting/chapter3/array.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment