Value > MAXWrapper > Controllers > Expression Controllers |
The Expression controllers in 3ds Max 8 and higher have been completely exposed to MAXScript via the IExprCtrl interface documented below.
In versions prior to 3ds Max 8, there were no properties or methods accessible for Expression controllers.
The following Expression controllers are available:
Float_Expression : FloatController
Point3_Expression : Point3Controller
Position_Expression : PositionController
Scale_Expression : ScaleController
Controls whether to throw when an error occurs in the expression.
All expression controllers expose the IExprCtrl Interface since 3ds Max 8 . This interface provides all methods to access the controller through MAXScript:
Sets the expression string to the string passed by-reference. Returns true on success, false otherwise.
Returns the expression string.
Returns the number of scalars defined in the controller.
Returns the number of vectors defined in the controller.
<boolean>AddScalarTarget <&TSTR>Name <value>Target Offset:<time> Owner:<maxObject> Name is In parameter Offset default value: 0f Owner default value: undefined
Adds a scalar target. The first argument is the name of the scalar. The second argument is the target to be connected to the scalar.
<boolean>AddVectorTarget <&TSTR>Name <value>Target Offset:<time> Owner:<maxObject> Name is In parameter Offset default value: 0f Owner default value: undefined
Adds a vector target. The first argument is the name of the vector. The second argument is the target to be connected to the vector.
<boolean>AddVectorNode <&TSTR>Name <node>Node Offset:<time> Name is In parameter Offset default value: 0f
Adds a vector node. The first argument is the name of the vector. The second argument is the node to be connected to the vector.
Adds a scalar constant. The first argument is the name of thescalar. The second argument is theconstantvalue to be assigned to the scalar.
Adds a vector constant. The first argument is the name of the vector. The second argument is the constant value to be assigned to the vector.
Sets the target of the given scalar variable. Returns true on success, false otherwise. The optional Owner parameter can be supplied to specify the owner of the target track in case the target is instanced across multiple objects.
<boolean>SetVectorTarget <value>Which <value>Target Owner:<maxObject> Owner default value: undefined
Sets the target of the given vector variable. Returns true on success, false otherwise. The optional Owner parameter can be supplied to specify the owner of the target track in case the target is instanced across multiple objects.
Sets the node of the given vector variable. Returns true on success, false otherwise.
Sets the value of the given scalar variable to the specified constant value. Returns true on success, false otherwise.
Sets the value of the given vector variable to the specified constant value. Returns true on success, false otherwise.
Deletes the variable with the given name. Returns true on success, false otherwise.
Returns the description string of the controller.
Sets the description string of the controller to the specified by-reference string argument.
Returns the offset of the given variable.
Sets the offset of the given variable to the specified time value.
Returns true if the named variable exists, false otherwise.
Returns the value of the given scalar constant.
Returns the target of the given scalar variable. If the optional asController parameter is set to true, the result will be a controller value.
Returns the value of the given vector constant.
Returns the target of the given vector variable. If the optional asController parameter is set to true, the result will be a controller value.
Returns the node of the given vector variable.
Returns the value of the given scalar variable.
Returns the value of the given vector variable.
Returns the value of the named variable.
<enum>GetScalarType <value>Which GetScalarType enums: {#unknown | #scalarTarget | #scalarConstant | #vectorTarget | #vectorConstant | #vectorNode}
Returns the type of the given scalar variable.
<enum>GetVectorType <value>Which GetVectorType enums: {#unknown | #scalarTarget | #scalarConstant | #vectorTarget | #vectorConstant | #vectorNode}
Returns the type of the given vector variable.
<enum>GetValueType <&TSTR>Name GetValueType enums: {#unknown | #scalarTarget | #scalarConstant | #vectorTarget | #vectorConstant | #vectorNode}
Returns the value type of the given variable.
Returns the name of the indexed scalar variable.
Returns the name of the indexed vector variable.
Returns the index of the named scalar variable.
Returns the index of the named vector variable.
Prints information about the expression controller, including description string, expression code, scalars and vectors details.
There is a discontinuity between the MAXScript Debugger window, getting variable values via Function Publishing System and evaluating the expression controller.
This means that while 'NT' might show one value in the Debugger dialog, its value in the evaluation may be different!