What is a Parameter?
 
 
 

Parameters (sometimes called properties) are the "atomic" elements of a property set whose values determine the behavior of something. For example, the posx parameter in Cone.kine.local.posx represents the local position in X of the cone object, whereas the viewvis parameter in Camera_Root.visibility.viewvis determines whether or not the camera root is hidden in the UI.

You can view and set parameter values through property editors in the UI. You can also get and set parameters through scripted or compiled code.

Tip

If you want to add your own parameters to an object you can use a CustomProperty object. For more information, see Custom Properties.

What Can Populate a Parameter?

Parameters contain data which is driven, or determined, either by a human, a scene element or another piece of data. There are two questions to ask about parameter values:

What Kind of Data Can a Parameter Contain?

The following types of data can populate a parameter:

  • basic types—numeric values (such as integer, long, float, double), boolean and string values.

  • special types—colors (floats bundled together for RGB or RGBA definition), compound parameters (parameters that themselves contain more parameters, such as the Local Transform) parameters that are objects (such as GridData, "profile" FCurve, etc.)

    Note

    FCurves that can directly populate a parameter are called profile curves and are available using the Parameter.Value property. These differ from the animation fcurves which are the source, or driver, of a parameter value.

    When you use the Parameter.Value property on a parameter that is driven by an animation fcurve you get a simple numerical value (for example, float), but you can also get the animation fcurve by using the Parameter.Source property.

    For more information, see FCurves.

What Can Drive a Parameter?

Parameter values can be changed via one of these methods:

  • user interface—property pages display parameter values which the user can modify directly.

  • proxy parameters—conduits to another parameter value; that is, you can control another parameter via a proxy (see Proxy Parameters).

    Note

    To get the master parameter from the proxy parameter, use the ProxyParameter.MasterParameter property.

  • expressions—mathematical formulas that control any animatable parameter (see Linked Parameters), including linked parameters, or dependencies between animatable parameters (see Linked Parameters).

  • custom operators—similar to expressions, but the logic is more complex, so you can apply the power of scripts and compiled libraries to read and write values (see Custom Operators).

    Note

    You can access any data source that is connected to a parameter using the Parameter.Source property. Data source types include Expression, ActionSource, Constraint, animationFCurve, ImageClip, Operator, Shader and StaticSource.

    However, remember that if you are using the Parameter.Source property on a proxy parameter, it always returns the source nested under the master parameter.