Custom Parameters

 
 
 

Custom parameters are parameters that you create to hold the data you define (data types, default values, and other options). Once you have created a custom parameter, you can connect it to other parameters in your scene to create custom controls. You can create custom parameters for objects, models, clusters on objects, groups, and the scene root.

Custom parameters need to live in custom parameter sets. If you don't already have a custom parameter set for an object, a default set is created when you create a custom parameter.

Creating Custom Parameters

  1. Select the element or a custom parameter set to which you want to add custom parameters.

    • If the element has no custom parameter set, a new one named CustomPset is created. You can rename this set later (in the explorer).

    • If the element has only one custom parameter set, the new custom parameters are automatically added to it.

    • If element has multiple custom parameter sets, select the parameter set to which you want to add the parameter. If you select the element instead of a specific set, the parameter is created in the custom parameter set that was last created.

  2. Choose Create Parameter New Custom Parameter from the Animate toolbar, or press Shift+P, or choose the same command from the Animation menu in the Animation panel.

  3. In the New Custom Parameter dialog box, set the options as desired:

    • Parameter Name is the name used in property editors, explorers, scripting, and expressions to identify the parameter.

      If there is already a parameter with the same name in the same custom parameter set, the property editor will display the name that you type but the name used in scripts and expressions will have a number is appended to it. For example, if there is already a parameter in the set named Sparky, the scripting names of additional parameters will be Sparky1, Sparky2, etc.

    • Value Type is the type of data the parameter can hold, such as Floating Point Number (that is, a decimal value), Text, Boolean, etc.

    • Value Range sets the minimum and maximum values for numeric parameters.

    • UI Range gives you a slider range that is a subset of the full parameter range. For example, an angle can have any value but you may want the slider to only go from –180 to 180.

      If you select Enable, the slider range uses the UI Minimum and Maximum values; otherwise, the whole parameter range is used.

    For a description of the other options, see New Custom Parameter Dialog Box [Properties Reference].

  4. Click OK. A new custom parameter is created and added to the custom parameter set.

Connecting Custom Parameters

Typically, an unconnected custom parameter is not very useful! By connecting it to other parameters, you can control various properties in your scene. For example, you can link custom parameters to mixer weight values of shapes or skeleton poses, then use the custom parameter sliders to quickly blend them.

TipYou can leave a custom parameter unconnected and use it as a global variable to share data between scripts.

You can connect a custom parameter in several ways:

  • Using linked parameters — Linking maps one parameter to another in a nonlinear way using a function curve. For more information, see Linking Parameters [Animation].

  • Using expressions — Create an expression for a parameter in your scene that references your custom parameter. Custom parameters use the same naming conventions as other parameters.

For example, if you have a custom parameter called Happy in a set called Emotion on an object called Face, you would use the string Face.Emotion.Happy to refer to it in expressions. For more information about expressions in general, see Animating with Expressions [Animation].

  • Using scripted operators — Create a scripted operator that controls parameters or shapes using the value of your custom parameters. For more information about scripted operators in general, see Scripted Operators.

  • Using scripts — The script name of a custom parameter is the same as its name in expressions. Although you can change parameter values via a script, there's no permanent connection. For more information about scripting in general, see Script Development [SDK Guide].

Tip

Trying to connect individual RGB color values to a custom parameter? The only way to do this is to mark these parameters in the explorer or marked parameter list. This is because the color sliders consist of four different parameters (red, green, blue, and alpha), which are not exposed in the property editor.

Select the object with the color value you want to use, then mark the individual R, G, B, or A parameter in the explorer or the marked parameter list. You can then link the parameters or set expressions on them, and therefore link them to a custom parameter.

Editing Custom Parameter Definitions

After you have created a custom parameter, you can change its name, value ranges, and UI ranges.

  1. Do one of the following:

    • Mark the custom parameter you want to edit and choose Create Parameter Edit Parameter Definition from the Animate toolbar.

      If you mark multiple custom parameters, the Edit Custom Command property editor displays only the information from the custom parameter you marked first, but then all the marked parameters will take on the changes you make.

      or

    • In the explorer, right-click the custom parameter name and choose Edit Parameter Definition.

  2. In the Edit Custom Parameter property editor, the current name and values are displayed, which you can edit as you like; however, you cannot edit the Value Type.

    Any connections you have set up with expressions, linked parameters, or scripts are maintained.

    Tip
    • If you have the custom parameter set property editor open, make sure to close and reopen it to see the changes you made to the custom parameters.

    • If you want to change the order of the custom parameters in the set, you should convert the property to a script-based one — see Migrating Properties to Self-Installing [SDK Guide].

Deleting Custom Parameters

You can delete custom and proxy parameters (animatable and non-animatable) individually.

  1. Mark the custom parameter to delete.

  2. Choose Create Parameter Remove Custom Parameter from the Animate toolbar, or choose the same command from the Animation menu in the Animation panel.

Note

You cannot delete a custom parameter if its value is driven by the animation mixer.

You can see non-animatable parameters in the explorer if you activate the All Nodes (Scripting) filter in the explorer's command bar.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License