Plug-in for Setting the Animation Range (NW4C Set Animation Range)

This plug-in sets animation ranges to the root node in Maya.
Animation Range is a feature for setting animation sequences in scenes for export.
The ranges specified by this feature can also be played back in Maya.

Setting an animation range adds a node directly below the root node for saving the animation range settings.
The node used to save the animation range settings is called the nnw4c_AnimRangeCtrl node.
The following settings are saved in the nnw4c_AnimRangeCtrl node as custom attributes.

For every root node, you can use up to 50 animation ranges.
A custom attribute for saving each separate set of animation range settings is called a channel.

To display the Animation Range window, select NW4C > NW4C Set Animation Range.

Window Overview

Root List shows a list of the root nodes to which animation ranges can be set. Double click on an item to select the root node in Maya. Scene animation objects, such as camera and light, are not displayed because animation ranges cannot be set for them.nw4c_AnimRangeCtrl List shows a list of all nw4c_AnimRangeCtrl nodes in a given scene. Double-click on an item to select the nw4c_AnimRangeCtrl node in Maya.
If animation ranges have been set for a particular root node, select that root node in the Root List to automatically select the associated items in the nw4c_AnimRangeCtrl List.
Conversely, select an item in the nw4c_AnimRangeCtrl List to select the corresponding item in Root List.
Edit shows the current settings of the nw4c_AnimRangeCtrl nodes that are selected in the nw4c_AnimRangeCtrl List, and enables you to edit those settings.
Current Animation Range Playback shows the UI for continuous playback of enabled animation ranges in Maya.
The File menu includes commands for importing and exporting animation range channel settings as files.
The Window menu includes commands for opening the Graph Editor and the Dope Sheet.

Setting a New Animation Range

Select the root node under Root List to which you want to set a new animation range. Right-click the node, and select Create and Attach nw4c_AnimRangeCtrl.

Editing an Animation Range

Select the nw4c_AnimRangeCtrl node that you want to edit under nw4c_AnimRangeCtrl List, and edit the node underEdit .

The name of the nw4c_AnimRangeCtrl node is shown in Current nw4c_AnimRangeCtrl. The name can also be changed.

To set the CMDL file for merging for each individual model, select the Merge cmdl File check box and specify the path to the CMDL file to merge. Clear the Merge cmdl File check box to apply the Export option setting instead.

Optimization options can be set for each model under Custom Options. (For details, see the description for Custom Options.)

Channel shows the channel names. Left-click a channel name to select the keys in the animation range for all animations under the root node. Drag channel names by using the wheel button to switch the order of the animation range. Drag the channel name by using the wheel button while holding down the CTRL key to copy the content of the animation range.

Select or clear Enable to enable or disable animation ranges. Only the animation ranges where Enable is selected are targets for export. If the Enable check box is cleared for all animation ranges, then animation is exported in the range specified by the Export option Start/End Frame, as if no animation ranges were configured. Right-click the Enable button to select Enable All and Disable All commands.

Title is the name of the animation range. The same name cannot be applied more than once.

Animation Range shows the start and end frames of the animation range. Animation ranges can overlap in terms of their ranges of frames. If you have created a new nw4c_AnimRangeCtrl node and selected Enable , the animation range is enabled at the moment you enter values to Animation Range.

Size displays the number of frames in the animation range.

Loop is the loop setting for the animation range. Select Loop to export the animation range as looped playback data. Clear this setting to export the animation range as one-time playback data.

The following operations are possible from the shortcut menu that is displayed by right clicking an item in the list. ("#" symbol represents a numeric value from 0 to 49.)

Set Anim Range Range from "Selected Range" : Sets the animation range to the range selected on the timeline in red.

Set Anim Range Range from "Playback Range" : Sets the animation range to the playback range.

Set Anim Range Range from "Scene Range" : Sets the animation range to the scene's animation range.

Set Playback Range from "nw4c_AnimRange#" : Sets the playback range to the animation range below the pointer.

Set Playback Range from "Enabled Anim Ranges" : Sets the playback range to the maximum range of the enabled animation ranges.

Select "nw4c_AnimRange#" Anim Curve : Selects the keys of the saved custom attributes for the animation range below the pointer.

Select "nw4c_AnimRange#" Hierarchy Anim Curve : Selects the keys for the animation range below the pointer, for all animations under the root node. The Scale tool is enabled at this time to make editing easier in the Dope Sheet.

Move Up "nw4c_AnimRange#" : Moves the animation range below the pointer one step higher in the list.

Move Down "nw4c_AnimRange#" : Moves the animation range below the pointer one step lower in the list.

Sort Order by Anim Range : Sorts the list according to the values of the start and end frames for the animation range.

Sort Order by Title : Sorts the list according to the animation range names.

Delete "nw4c_AnimRange#" : Deletes the animation range below the pointer.

Delete "Disabled Anim Ranges" : Deletes disabled animation ranges.

Add Key to Hierarchy from "nw4c_AnimRange#" : Sets anchor keys for the animation range below the pointer, for all animations under the root node. The Scale tool is enabled at this time to make editing easier in the Dope Sheet.

Add Key to Hierarchy from Enabled Anim Ranges : Sets anchor keys for the maximum range of enabled animation ranges, for all animations under the root node. The Scale tool is enabled at this time to make editing easier in the Dope Sheet.

(Anchor keys are keys used to set the start frame and end frame in the animation range for all channels for which keys have been set. Sometimes they are set so that the animation range is not influenced by the left and right animation ranges.)

nw4c_AnimRangeCtrl Node Operations

Right-click the item on the nw4c_AnimRangeCtrl List to show the commands for the following operations.

Create nw4c_AnimRangeCtrl : Creates an nw4c_AnimRangeCtrl node that is not associated with any root node.

Duplicate Highlighted : Creates a duplicate of the highlighted nw4c_AnimRangeCtrl node.

Attach Highlighted to : Connects the highlighted nw4c_AnimRangeCtrl node to a root node for which no animation range is set. Connection destinations are listed in the menu. This command is disabled if there are no connectable root nodes.

Detach Highlighted : Detaches the highlighted nw4c_AnimRangeCtrl node from the root node to which it is connected. This command is disabled for nw4c_AnimRangeCtrl nodes that are not connected to root nodes.

Delete Highlighted : Deletes the highlighted nw4c_AnimRangeCtrl node. If there is a hierarchy below the nw4c_AnimRangeCtrl node, everything in the lower hierarchy is deleted at the same time.

The nw4c_AnimRangeCtrl node is a transform node.
Although you can connect multiple nw4c_AnimRangeCtrl nodes as children of a single root node using Hypergraph, only the first node in terms of DAG evaluation order is enabled.
Furthermore, nw4c_AnimRangeCtrl nodes that are not immediately below the root node are disabled.
nw4c_AnimRangeCtrl nodes are not exported to the intermediate file.

Playing Animation Ranges In Maya

Enabled animation ranges can be continuously played in Maya by using the UI in the Current Animation Range Playback.
This is an effective way to check the linkages between animation ranges, because during playback you can skip over frames for which animation ranges are not set, and the places where animation ranges have been disabled.

Click the (Animation Range Playback) button to play through the enabled animation ranges once from the beginning. Playback always stops at the last frame of the animation range, unless you stop in the middle of the playback.

Click the (Animation Range Loop Playback) button to play a loop of the enabled animation ranges from the beginning.

During playback, both the Animation Range Playback button and the Animation Range Loop Playback button both switch to show the (Stop Animation Range Playback) button. Click this button to stop animation range playback.

Loop Count specifies how many times the looped animation range is played. After looping this specified number of times, the process switches to the next animation range. If a particular animation range has not been set for looping, it plays once and then the process switches to the next animation range.

When you are playing back animation ranges by using either the Animation Range Playback button or the Animation Range Loop Playback button, neither the Stop button in the Maya main window nor the ESC key can be used to stop playback. Use the Stop Animation Range Playback button to stop playback.
Animation range playback stops if the NW4C Set Animation Range window is closed.

In scenes and drawing modes with high processing overhead, the places where animations connect can stand out. Utilize this animation range playback feature in Maya for nothing more than simple checking.

Importing and Exporting Animation Range Channel Settings as Files

Select commands from the File menu to import or export animation range channel settings, (that is, the contents in the Edit menu), as MEL files. Before importing or exporting you must first select the target nw4c_AnimRangeCtrl in the nw4c_AnimRangeCtrl List.

Import Animation Range Channels : Imports the animation range channel settings from a file. Select this command to open a file selection window. Select the file you want to import, and then click Import. Next, the Import Option window is displayed.

Click All to import all channel settings (Enable, Title, Animation Range and Loop).
Click Title and Range to only import Title and Animation Range.
Click Only Title to only import the Title setting.

Export Animation Range Channels : Exports the animation range channel settings to a file. Select this command to open a file selection window. Specify the export file, and then click Export.

Editing Animation Ranges using the Graph Editor or the Dope Sheet

Keys are set to nw4c_AnimRange# custom attributes (where # represents a number from 0 to 49) for the Start/End frames of the animation range, and these can be checked and edited using the Graph Editor and the Dope Sheet. The only values applied to the start and end frames are the Time values of the first and last keys. All keys between the first and last keys are ignored.
Setting the key Value simply avoids the overlapping of animation curves on the Graph Editor. Changing the value has no effect on the exported data.
If all of the nw4c_AnimRange# keys are deleted, that animation range is not exported.

Setting Optimization Options for Each Model

To set optimization options for each model, expand Custom Options and select the Enable Custom Options check box.

The settings items are the same as the optimization options of the Export plug-in. The optimization options that are set here take priority over the optimization options specified by the Export plug-in. (If Enable Custom Options is cleared, the optimization options specified by the Export plug-in are applied.) When batch exporting, the optimization options set here take priority over the optimization options specified in the C3ES file.





CONFIDENTIAL