List of Macro Recorder Value Types
See Also: Class MacroRecorder, Class Point3, Class Matrix3, Class Color, Class AngAxis, Class Quat, Class BitArray, Class PBBitmap, Class Class_ID, Class ParamDimension.
One of the following macro recorder type tags followed by the argument(s) indicated. Depending upon the case there may be one, two or three arguments as noted:
Basic C Types:
mr_int
An integer. Follow the tag with the int.
Example code: 91462
mr_float
A floating point value. Follow the tag with a double.
Example code: 123.45
mr_string
A string. Follow the tab with the string (TCHAR*).
Example code: "Benson"
mr_bool
A boolean. Follow the tag with a int.
Example code: true
MAX SDK Types:
mr_point3
A Point3. Follow the tag with a Point3*.
Example code: [10,0,0]
mr_color
A Color. Follow the tag with a Color*.
Example code: color 12 128 0
mr_angaxis
An AngAxis. Follow the tag with an AngAxis*.
Example code: angleAxis 45[1,0,0]
mr_quat
A Quaternion. Follow the tag with a Quat*.
Example code: quat 1 0 0 0
mr_time
A TimeValue, follow the tag with a TimeValue.
Example code: 22f
mr_reftarg
A Reference Target pointer. Follow the tag with a ReferenceTarget*.
Example code: $foo or $baz.modifiers[2] or $foo.material, etc.
mr_bitarray
A bit array. Follow the tag with a pointer to a BitArray*.
Example code: #{1..20, 30,34..100}
mr_pbbitmap
A parameter block2 bitmap object. Follow the tag with a PBBitmap*.
Example code: bitMap 640 480 fileName:"fuz.bmp"
mr_matrix3
A Matrix3. Follow the tag with a Matrix3*.
Example code: matrix3 [1,0,0] [0,1,0] [0,0,1] [10,0,0]
mr_dimfloat
A floating point value with the specified ParamDimension. Follow the tag with: ParamDimension*, double.
Example code: 123.45 (scaled by the dimension)
mr_dimpoint3
A Point3 value with the specified ParamDimension. Follow the tag with: ParamDimension*, Point3*.
Example code: [10,0,0] (scaled by the dimension)
mr_classid
A Class ID, follow the tag with a Class_ID and a SClass_ID.
Example code: box (the class variable name)
mr_create
A constructor call for the class. Follow the tag with: Class_ID, SClass_ID, int, <args>
The int parameter is the number of keyword args following, these are specified in pairs as TCHAR*, <arg>
Example code: sphere radius:20 pos:[10,0,0]
mr_angle
A floating point value with a ParamDimension of a stdAngleDim. Follow the tag with a double.
Example code: 90
mr_percent
A floating point value with a ParamDimension of stdPercentDim. Follow the tag with a double.
Example code: 10
MAXScript Types:
mr_sel
A selection set. This tag works alone with no additional data. This tag denotes the current scene node selection and will emit as either a '$' or an array of explicit objects, depending on the state of the EmitAbsoluteSceneNames() flag.
Example code: $ or $sphere01
mr_funcall
A function call. Follow the tag with an int, int, <args>
The first int parameter is the number of positional arguments, given first in the <args> items, as <arg>, the second int parameter is the number of keyword args following the positional args in <args>, given as TCHAR*, <arg> pairs.
Example code: foo x y z output:f
mr_varname
A variable name. Follow the tag with a string (TCHAR*).
Example code: baz
mr_index
An index. Follow the tag with: <op_arg>, <index_arg>
<op_arg> is an <arg> specifying the operand to be indexed and <index_arg> is an <arg> specifying the index value.
Example code: meditMaterials[3]
mr_prop
A property name. Follow the tag with TCHAR*, <arg>. The TCHAR* is the property name, the <arg> specifies the item being accessed.
Example code: $foo.pos
mr_nurbssel
A NURBS selection level. Follow the tag with: int, ReferenceTarget*
The int parameter is the selection level desired of the specified NURBS base object.
Example code: #{1..20, 50..100}
This is an example of a BitArray literal in MAXScript, so it says sub-objects 1 through 20 and 50 through 100 are currently selected at the given level (the int) in the NURBS ReferenceTarget* base object.
mr_name
A name. Follow the tag with a string (TCHAR *).
Example code: #relational
Note: A name in MAXScript is a simple symbolic value, often used instead of numbers to denote options in some function call. For example, when setting the motion blur of a scene node, one can say:
$foo.motionBlur = #image (or #none, or #object)
generated, perhaps by:
macroRecorder->SetSelProperty(_T("motionBlur"), mr_name, blurname);
or when choosing g-buffer channels in the render() function, one would say:
bm = render camera:$c1 channels:#(#zdepth, #coverage, #objectID)