Posted October 10, 2022 by Will_Whiteside
Coding in Maya:
"import maya.cmds" - This line is needed at the start of the code to allow python to understand we are using Maya.
This script generates a set number of random cubes with a different position, rotation and size in the workspace.
to do this we first need to create a random number seed using the:
"from random import seed"
"from random import randint"
"seed(1)"
Once we have imported the seed we can then tell the program how many times I want the following code to repeat. This is done with the:
"for i in range(number of times we want to repeat code):"
The rest of the code is the different variables that we want to randomise and repeat.