Connection Template Property Editor

 
 
 

To create a new connection-mapping template, choose Effect Create Empty Cnx Template in the animation mixer or choose Actions Templates Create Empty Cnx Template from the Animate toolbar.

To redisplay: Choose the template from the Effect Cnx Template menu in the animation mixer. The property editor includes a table showing each rule in the template.

You can select a rule in the Connection Template property editor by clicking its name in the Template column (for example, Rule 1) or by placing the cursor in either text box in the corresponding row.

For more information, see Connection Mapping Templates [ Nonlinear Animation in the Animation Mixer ].

Template

Lists the rule numbers for each connection item.

Map From

A string to be replaced, usually an object name. When this connection template is active and an action clip is instantiated, all parameters that begin with this string will be mapped to new parameters.

Map To

A string to replace with, usually another object name. When this connection template is active and an action clip is instantiated, parameters that begin with the corresponding Map From string will be mapped to these parameters.

Active

Whether this connection template is active. When an action clip is instantiated, the rules in the currently active connection mapping template are applied. Changing this does not affect the connections of existing clips; you must delete and reinstantiate clips to change existing connections.

Insert Rule

Adds a new blank rule to the template. The new rule is added immediately above the selected rule — this is important to know because the rules are evaluated in order from top to bottom.

Delete Rule

Deletes the selected rule.

Validate

Checks the rules for validity. If an object or parameter name does not exist in the current model, it is shown in red.

Rules with wildcards, substring substitution, or the <unmapped> token are always shown in red.

TipTo see the rules better, you can resize the property editor as well as the columns. To resize a column, move the pointer over the dividing line between column headings. Once the pointer changes to a double-headed arrow, click and drag to set a new width.

Editing Rules

You can edit rules in the Connection Map property editor by selecting (or typing) object and parameter names in the Map From and Map To columns. This substitutes names in the Map From column with those in the Map To column.

When you click in any cell, an arrow appears on its right displaying a list of all objects and parameters available for that model.

The rules use the same parameter names that are used in scripting — if you are not sure of a parameter's name, modify the parameter in a property editor and check the name that gets logged in the SetValue command in the Command Box at the lower left of the main window.

To leave the animation of a particular object or parameter unmapped, map it to an empty string or the <unmapped> token. To substitute part of an object or parameter name you must use special characters as described in Changing Parts of a Name (Substrings).

It is important to remember the following about how rules are applied:

  • For each parameter contained in an action, the rules are evaluated in order (top to bottom) to see whether they can be applied.

  • Once a rule is applied, the remaining rules are not evaluated and the next parameter in the action is processed. The exception is substring substitution — if a substring substitution rule is applied, the remaining rules are still evaluated (until, of course, a non-substring rule is applied).

Example 1: Mapping objects

This rule maps any parameter on the object named torus to the corresponding parameter on the object named cone.

Map From

Map To

torus

cone

Example 2: Mapping parameters

This rule maps the local X position of torus to the local Y position of cone.

Map From

Map To

torus.kine.local.posx

cone.kine.local.posy

Example 3: Leaving objects disconnected

This rule maps all parameters on the object named torus to nothing.

Map From

Map To

torus

<unmapped>

You can also do the same thing by leaving the Map To cell blank.

Example 4: Leaving parameters disconnected

This rule maps the local X position of torus to nothing.

Map From

Map To

torus.kine.local.posx

<unmapped>

You can also do the same thing by leaving the Map To cell blank.

Example 5: Using wildcards

This rule maps all parameters on the object named null to all objects whose names begin with "null"; for example, null1, null2, and so on.

Map From

Map To

null

null*

Changing Parts of a Name (Substrings)

You can also create connection-mapping rules that change part of an object name (its substrings). This allows the template to be reused in different contexts — you don't need to explicitly specify a particular object name. In addition, you can "clamp" the substring search so that it only replaces substrings at the beginning or end of the object name. These rules are most useful if you follow a strict naming convention for your objects and models. Substring substitution does not work for parameter names.

Once a substring substitution rule is applied to a parameter in an action, the remaining rules are still evaluated. This lets you perform multiple substring substitutions on the same parameter.

Substituting Substrings

To specify a substring to replace, enclose the characters within square brackets [ ] in the Map From column of the Connection Map property editor.

Example

This rule maps "prefix_Object1_suffix" to "prefix_Object2_suffix".

Map From

Map To

[Object1]

Object2

Substituting Substrings at the Beginning of an Object Name

You can restrict a substring substitution to the beginning of an object name. This is useful for changing a prefix without accidentally affecting the same substring if it occurs elsewhere. To do this, use a caret (^) as the first character within the square brackets.

Example

This rule strips out "prefix_" from the beginning of object names, replacing it with nothing (an empty string).

Map From

Map To

[^prefix_]

Substituting Substrings at the End of an Object Name

Similarly, you can restrict a substring substitution to the end of an object name. This is useful for changing a suffix without accidentally affecting the same substring if it occurs elsewhere. To do this, use a dollar sign ($) as the last character within the square brackets.

Example 1

This rule adds the string "_suffix" to the end of all object names.

Map From

Map To

[$]

_suffix

Example 2

This rule changes "suffixA" to "suffixB" in all object names.

Map From

Map To

[suffixA$]

suffixB

Substituting Substrings in Parameter Names

Ordinarily, substring substitution works only on object names. To substitute substrings in parameter names as well as object names, use an AT symbol (@) as the first character within the square brackets.

Example

This rule changes "local" to "global" in all object and parameter names.

Map From

Map To

[@local]

global

Combining Substring Substitution and Other Rules

Substring substitution rules are applied before the other rules. This means that a rule can be applied to the result of a substring substitution.

Example

The substring substitution rule is applied first, mapping null.kine.local.posx to null.kine.global.posx. This result is then mapped to nothing, so that animation originally defined for null.kine.local.posx is left unconnected.

Map From

Map To

null.kine.global.posx

<unmapped>

[@local]

global

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