Python for 3ds max – Create Objects

3ds Max 2019


from MaxPlus import ClassIds
from MaxPlus import Point3
import random

# Define Sphere geometry object:
sphere_obj = Factory.CreateGeomObject(ClassIds.Sphere)
sphere_obj.ParameterBlock.Radius.Value = 5
sphere_obj.ParameterBlock.Segs.Value = 64

# Create a list of 10 sphere instanced objects:
spheres = []
for i in range(10):

# Move spheres to random positions
for s in spheres:
    s.SetLocalPosition(Point3( random.randint(-50,50),
    scale = 5.0 * (random.randint(30,100)/100.0)

* note that when copying and pasting a script from this example, the indentation may not be pasted correctly.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s