2 Creates a number of boxes with random scale, position, and rotation.
4 import random, math, MaxPlus
10 return -math.pi + (rnd() * 2 * math.pi)
16 return rnd() * 100.0 - 50.0
22 return rnd() * 2.0 + 0.1
25 return MaxPlus.Point3(rndScaleAmount(), rndScaleAmount(), rndScaleAmount())
27 def randomTransformNodes(nodes):
29 n.Scaling = rndScale()
30 n.Rotation = rndQuat()
31 n.Position = rndPosition()
33 def createNodes(obj, cnt):
38 box.ParameterBlock.Length.Value = 10.0
39 box.ParameterBlock.Height.Value = 10.0
40 box.ParameterBlock.Width.Value = 10.0
41 nodes = createNodes(box, 25)
42 randomTransformNodes(nodes)
44 if __name__ ==
"__main__":