Basic maxscript syntax

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.