Checking for Animation Dependency Cycles

 
 
 

Building animation relationships involving constraints, expressions, and scripted operators can often lead to evaluation cycles. An evaluation cycle is a looped graph dependency where an operation becomes dependent upon itself.

As a simple example, constraining object A to object B (such as with an orientation constraint) then constraining object B to object A with the same type of constraint will create a cycle of dependencies. Another example is putting an expression on the Length parameter of a bone in a chain, where the expression is the distance from the chain's root to its effector. This is a cycle because you're driving the Length parameter using the translation of the effector, but the effector's position is bound to the bone's length (and rotation).

Softimage implements internal cycle checking to prevent cycles from occurring in a scene. Using the CycleChecking command, Softimage checks for cycles as soon as you create a constraint or expression, and warns you immediately if a cycle in dependencies is created.

The CycleChecking command simply reports cycle details in the command history so that you can check that there's not a problem; for example, sometimes you want to intentionally create a cycle, such as direction-constraining two objects to create a piston. This command does not prevent a scene from loading even if there is a cycle problem.

If there is a problem cycle, the warning messages and information in the script editor can help you break it.

Avoiding Cycles

To help you prevent creating cycles, you can do any of the following:

  • Check where constraints already exist in a 3D view or in the schematic view — see Viewing Constraints and Their Information.

  • Select an object and choose Constrain Select Constraining Objects to see the objects to which the selected object is constrained.

  • Type the command CycleChecking in the script editor and click Run to check an entire scene. Select the command and press F1 to get more information on it.

For information on constraints, see Animating with Constraints.

For information on expressions, see Animating with Expressions.

For information on scripted operators, see Scripted Operators [Customizing Softimage].

Disabling Cycle Checking

You can disable cycle checking if you want to avoid unwanted warning messages in some situations where you know desirable cycles exist. There are two options on the Scene Debugging tab in Data Management Preferences that you can set:

  • Disable cycle checking when applying animation operators

  • Disable cycle checking when editing ICE trees

Breaking Cycles

To break an evaluation cycle, you should look for and remove the main contributors within the cycle.

  1. Open the script editor and check for cycle warning messages and information to help you break a cycle.

    In this example, these warning messages appeared because there was a cycle created by two expressions driving the same parameter.

  2. To look for key contributors in the cycle, start with the Cycle Breaking Point statement, which is the location where the evaluation check has terminated. This is the critical location for scene evaluation differences or any odd results and behaviors you many notice with problematic cycles.

  3. Trace down the output with the Cycle through operators until the same Cycle Breaking Point operator is found and labeled as a Cycle through operator.

    These are the main contributors to the cycle: breaking one of these key dependencies will break the dependency cycle.

  4. Look through the contributors for familiar cycle creators such as Expression, ScriptedOp, or kine.Constraints.

  5. Check your animation that uses these operators and resolve the problem by reworking the animation or deleting the operator.

Tip
  • If a cycle exists with constrained objects, a message appears telling you to remove the last constraint you applied to resolve the conflict (see Removing (Relaxing) Constraints).

  • You can also deactivate a constraint (see Activating and Deactivating Constraints) to break a cycle because inactive constraints are not considered when Softimage checks for cycles.

  • Muting or having 0 as the Blend Weight value for a constraint doesn't stop it from being evaluated so it could contribute to a cycle.

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