Showclass usage
Syntax: showclass <pattern_string> [: <stream>]
- Showclass "box. *" -- display the attributes of the box class.
- Showclass "path *" -- display all classes whose names start with Path
- Showclass "noise. *" -- display all accessable attributes of noise class textures
- Showclass "*: mod *" -- display all modifier classes
- Showclass "*. * rad *" -- display all classes with attributes whose names contain the character Rad
- Showclass "*. *" to: f -- display all classes, superclasses, and attributes, and output them to the specified file
- Showclass "*: * controller *" -- display all classes whose names contain the character Controller
Showproperties () function
The showproperties () function is used to display the attributes of a specific maxwrapper class object.
Syntax: showproperties <maxwrapper_object> [<property_pattern>] [to: <stream>]
- Showproperties $ Foo. Bend -- display the bend_modifier attribute of the object foo
- Ffdmod = $ Baz. 'ffd_box_4x4x4 '-- point to the ffd_modifier of the Baz object
- Showproperties ffdmod "disp *" to: log -- display the attributes starting with disp in ffd_modifier
- Showproperties $ Foo. Pos. Controller -- display the secondary controller in the position class Controller
Move, rotate, and zoom
- Move)
- Move <name_obj> [(x, y, z)]
- Move mybox [10, 0, 0]
- Scale)
- Scale <name_obj> [(x, y, z)]
- Rotate)
- Rot_obj = eulerangles X Y Z
- Rotate mybox rot_obj
Add Modifier
Syntax: addmodifier obj_name (modifier_name <parameters>)
- Addmodifier mybox (twist angle: 30)
- Mybox. Twist. angle = 60 -- modify the modifier Parameter
Create an animation
Animate on
(
At time 0 (mybox. Pos = [-0.25, 0, 0]; mybox. Scale = [,])
At time 100 (mybox. Pos = [, 0, 0]; mybox. Scale = [, 3])
)
Array
An array is a collection of data. In maxscript, each element of an array can be any different data class.
And can be obtained separately.
Syntax: # (<expr>, <expr>)
Each <expr> can be a number, expression, or character.
Method
- Classof <value> -- returns the Data Type of <value>.
- Superclassof <value> -- returns the <value> super class, that is, the parent class of the <value> class.
- For OBJ in $ * Do (if classof OBJ = Box then append allboxes OBJ)
- Iskindof <value> <class> -- If <value> inherits from class <class>, true is returned; otherwise, false is returned.
- Allboxes = for OBJ in $ * Where (iskindof OBJ box) do collect OBJ
- Isstructdef <value> -- returns true if <value> is a schema definition.
- Isstruct <value> -- returns true if <value> is data of a structural class.
- Iscontroller <value> -- returns true if <value> is a controller.
Basic maxscript syntax