2 Demonstrates creating many different types of scene objects that are visible in the viewport.
3 The scene objects are grouped by type.
4 The types created are Cameras, Lights, Geometric Objects, Shapes, Helpers, Modifiers and Materials.
9 def GeneratePlugins(sid, cls):
12 if cd.SuperClassId == sid
and cd.ClassId != Conform_cid:
24 box.ParameterBlock.Height.Value = 5.0
25 box.ParameterBlock.Width.Value = 5.0
26 box.ParameterBlock.Length.Value = 5.0
30 def CreateText(pos, message):
32 tex.ParameterBlock.size.Value = 20.0
33 tex.ParameterBlock.text.Value = message
41 box.ParameterBlock.Radius.Value = 5.0
45 def CreateBoxNode(x, y):
53 def CreateCameras(y_position):
61 if ((x_position % 260.0) < 0.001):
67 def CreateLights(y_position):
75 if ((x_position % 260.0) < 0.001):
81 def CreateObjects(y_position):
82 CreateText(
MaxPlus.Point3(-88, y_position, 0),
"Geometric objects")
89 if ((x_position % 260.0) < 0.001):
95 def CreateShapes(y_position):
103 if ((x_position % 260.0) < 0.001):
109 def CreateHelpers(y_position):
116 if ((x_position % 260.0) < 0.001):
122 def CreateModifiers(y_position):
129 print '\tAdding modifier: %s' % m
132 if ((x_position % 260.0) < 0.001):
138 def CreateMaterials(y_position):
142 for m
in GeneratePlugins(MaxPlus.SuperClassIds.Material,
MaxPlus.Mtl):
155 y = CreateModifiers(y)