Usage of Random Values
To Add you a random value to your macro, you can use the random library of python. You can replace any value of the macro with a function of the random library.
Examples
You can add a random value to the location of an object by replacing the (X, Y, Z)-values of the location.

To input integers you can use the randrange function by writing random.randrange(startvalue, endvalue)

In the example we get back a random integer value between 0 and 10. The location of the object could be (2,4,0) or (3,8,6) and so on. To add a random floating point number you can use the uniform function by writing random.uniform

In the example we get back a random value between -5 and 5. The location of the object could be (3.01,-2.366,0.398) or (-1.801,4.222,-5) and so on.
Comentarios