|
Object Creation
Objects can be created in a straightforward way,
by assigning them to variables.
A BOX will be created, with default dimensions (25,25,25)
and located in the origin (0,0,0).
To view the object properties, we can use the built-in
Showproperties function, which will list all properties of an object.
The following properties will be listed:
.height : float
.length : float
.lengthsegs : integer
.width : float
.widthsegs : integer
.mapCoords : boolean
.heightsegs : integer
To modify these properties, we simply type the object
variable followed by the property, separated by a dot, just like the following
example:
-
Type b.height = 30, b.width = 60 and b.heightsegs
= 15
Notice the object will be livetime updated in the viewports.
Besides these properties, we can access Position,
Rotation and Scale properties this way:
<object>.pos.x = 17.5 - indicates the X position
<object>.pos = [10,20,-15] - indicates de [X,Y,Z]
position
<object>.rotation.x = 90 - indicates the X rotation
(using TCB)
<object>.rotation.x_rotation = 90 - indicates
the X rotation (using Euler)
<object>.scale.y = 1.5 - indicates the Y scale
These properties can vary according to the animation
controllers assigned to the object.
-
Type b.pos.x = 25 and b.rotation.z_rotation
= 45
We can assign modifiers using the built-in addmodifier
function.
-
Type addmodifier b (bend())
Using the same processes we used above, we can list
all properties of the Bend modifier.
-
Type Showproperties b.bend
MAXScript will then list all properties:
.angle : float
.axis : integer
.direction : float
.limit : boolean
.upperlimit : float
.lowerlimit : float
.center : point3
.gizmo : transform
-
Type b.bend.angle = 45 to change the Bend angle
and b.bend.direction = 90 to change the Bend direction.
From the steps you've seen so far, you can imagine it's
easier to create a Box and apply Bend to it directly.
On the next tutorial you will see how to make these
steps practical.
Alexander Esppeschit Bicalho ©
1999
|