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.
|
You can leave a custom parameter unconnected and use it as a global variable to share data between scripts. |
To connect custom parameters
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 in the Animation guide.
• 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 in the Animation guide.
• 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 Scripts.
|
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. |
This example shows you how to create a slider that controls the movement of a finger.
Make a custom parameter set
Create a custom parameter set with two parameters that you will use to animate a character’s hands:
1. Create a simple hand using the following illustration as an example (see Building Skeletons in the Character Animation guide for information on creating chains).
2. In the explorer, select the hand’s node and choose Create > Parameter > New Parameter Set from the Animate toolbar. Name the set hand_custompset.
Add a custom parameter to the parameter set
3. To select the new custom parameter set you just created, select the character’s node in the explorer and press e to isolate it, then select hand_custompset.
4. Choose Create > Parameter > New Parameter. In the property editor, name the new parameter r_hand and set the Value Range Maximum value to 10. This creates a slider for this parameter that goes from 0 to 10.
You have now created a custom parameter set available under the hand’s node—double-click it in the explorer to see the r_hand slider in it.
Link the rotation Z parameter to a bone
5. On the hand, select the end bone on the pinky.
6. Press Ctrl+k to open the bone’s Local Transform property editor.
7. In the property editor, right-click the Rotation Z animation icon (the green box) and choose Link With.
8. In the pop-up explorer, expand the hand_custompset node and pick the r_hand parameter. This links the local Z rotation of the first bone with the r_hand slider. The Rotation Z animation icon has an “L” to show that it is linked.
9. Right-click the animation icon for Rotation Z again and choose Set Relative Values. This ensures that the value of rotz will be the current value (such as 0) when the value of r_hand is its current value 0.
10. In the property editor for the custom property set, change the value of the r_hand slider to 10.
11. Change the value of Rotation Z to 90 and choose Set Relative Values again. Now when r_hand is at 0, Rotation Z is at 0, and as r_hand goes up to 10, Rotation Z goes up to 90.
Now when you drag the r_hand slider, the Rotation Z updates accordingly.
You can continue creating custom sliders for each bone of the hand in this manner.
SOFTIMAGE|XSI v.6.01