TEMERITY

us.temerity.pipeline.plugin.MayaCollateAction.v2_0_12
Class MayaCollateAction

java.lang.Object
  extended by us.temerity.pipeline.Named
      extended by us.temerity.pipeline.PluginID
          extended by us.temerity.pipeline.BasePlugin
              extended by us.temerity.pipeline.BaseAction
                  extended by us.temerity.pipeline.plugin.MayaCollateAction.v2_0_12.MayaCollateAction
All Implemented Interfaces:
Serializable, Cloneable, Comparable<PluginID>, Glueable

public class MayaCollateAction
extends BaseAction

Generates a new Maya scene from model scenes and imported animation data.

A new empty scene is first created. The model scenes are imported as Maya references from each source node who's primary file sequence is a Maya scene file (.ma or .mb). Each of these model scenes should contain a DAG node which has a name that matches the Root DAG Node single parameter (usually called ROOT) under which all visible geometry is grouped. These scenes should also contain a Maya set which has a name that matches the value of the Import Set single parameter (usually called SELECT). When a model scene is imported, it is placed in a Maya namespace which matches the prefix of the model scene file name. This default namespace can be overridden by setting the per-source PrefixName parameter for the referenced scene.

Then the animation data is imported from each animation file (.anim) sequence which sets the per-source Order parameter. This animation data is then applied to the imported reference objects in the generated scene.

The animation data is composed of a series of shots. Each shot contains one or more animations of equal frame length which share the same Shot Order. Shots are processed in lowest to higest Shot Order. The animations which make up the first shot (lowest Shot Order) are applied to the generated Maya scene starting at Begin Frame. Subsequent shots are concatented after each previous shot. All animation file sequences which share the same Order must be of the same length. Animstion length is determined by looking at the single parameters of the MayaExportAnim action which generated the animation files. This means that all animations used by MayaCollate must have been generated by a MayaExportAnim action.

For each shot, the prefixes of the animation files (which set Order) must correspond to the prefix of one of the imported reference model scenes (or PrefixName, if set). If there is no model to for an animation, an error will be generated. Conversely, any models which have no corresponding animation for a shot will have the visibility of their "ROOT" DAG node set to (false) for the duration of the shot. This allows objects which only should appear in a subset of the shots to remain properly hidden when not animated.

At each stage in the process, optional MEL scripts may be evaluated. The MEL scripts must be the primary file sequence of one of the source nodes and are assigned to the appropriate stage using the Intial MEL, Model MEL, Anim MEL and Final MEL single valued parameters.

This action defines the following single valued parameters:

Root DAG Node
The DAG node in each the model scene under which all visible geometry is grouped.

Import Set
The name of the Maya Set in each model scene used to identify the DAG nodes to which the imported animation will be applied.
Begin Frame
The frame number of the first animation keyframe in the generated Maya scene.

Linear Unit
The linear unit that the generated scene will use.

Angular Unit
The angular unit that the generated scene will use.

Time Unit
The unit of time and frame rate that the generated scene will use.

Initial MEL
The source node containing the MEL script to evaluate just after scene creation and before importing any models.

Model MEL
The source node containing the MEL script to evaluate after importing all models, but before loading and applying any animation data.

Anim MEL
The source node containing the MEL script to evaluate after loading and applying all animation data, but before saving the generated Maya scene.

Final MEL
The source node containing the MEL script to evaluate after saving the generated Maya scene.

This action defines the following per-source parameters:

Order
Determines the order in which the animations are concatenated. Animations are processed from least to greatest Order. All animations with the same Order are applied to the same frame range in the generate Maya scene.

Prefix Name
The namespace prefix for the referenced scene in Maya instead of the filename prefix.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class us.temerity.pipeline.BasePlugin
pDescription
 
Fields inherited from class us.temerity.pipeline.PluginID
pVendor, pVersionID
 
Fields inherited from class us.temerity.pipeline.Named
pName
 
Constructor Summary
MayaCollateAction()
           
 
Method Summary
 TreeMap<String,ActionParam> getInitialSourceParams()
          Get an initial set of action parameters associated with an upstream node.
 SubProcessHeavy prep(ActionAgenda agenda, File outFile, File errFile)
          Construct a SubProcessHeavy instance which when executed will fulfill the given action agenda.
 boolean supportsSourceParams()
          Does this action support per-source parameters?
 
Methods inherited from class us.temerity.pipeline.BaseAction
addPreset, addPresetValues, addSingleParam, chmod, cleanupLater, clearAllLinkParams, clearLinkParams, clone, createTemp, createTemp, equals, equalSingleParams, equalSourceParams, fromGlue, getPluginType, getPresetChoices, getPresetValues, getSecondarySequences, getSecondarySourceNames, getSecondarySourceParam, getSecondarySourceParams, getSecondarySourceParamValue, getSingleLayout, getSingleParam, getSingleParams, getSingleParamValue, getSourceLayout, getSourceNames, getSourceParam, getSourceParams, getSourceParamValue, getTempDir, getTempPath, hasSecondarySourceParams, hasSingleParams, hasSourceParams, initSecondarySourceParams, initSourceParams, removeAllSourceParams, removeSecondarySourceParams, removeSecondarySourceParams, removeSourceParams, setSecondarySourceParamValue, setSingleLayout, setSingleParamValue, setSingleParamValues, setSourceLayout, setSourceParamValue, setSourceParamValues, toGlue
 
Methods inherited from class us.temerity.pipeline.BasePlugin
addSupport, compareTo, getDescription, getFullMessage, getPluginID, getResource, getResources, getResourceSize, getSupports, isUnderDevelopment, removeSupport, setSupports, supports, toString, underDevelopment
 
Methods inherited from class us.temerity.pipeline.PluginID
getVendor, getVersionID
 
Methods inherited from class us.temerity.pipeline.Named
getName
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MayaCollateAction

public MayaCollateAction()
Method Detail

supportsSourceParams

public boolean supportsSourceParams()
Does this action support per-source parameters?

Overrides:
supportsSourceParams in class BaseAction

getInitialSourceParams

public TreeMap<String,ActionParam> getInitialSourceParams()
Get an initial set of action parameters associated with an upstream node.

Overrides:
getInitialSourceParams in class BaseAction

prep

public SubProcessHeavy prep(ActionAgenda agenda,
                            File outFile,
                            File errFile)
                     throws PipelineException
Construct a SubProcessHeavy instance which when executed will fulfill the given action agenda.

Overrides:
prep in class BaseAction
Parameters:
agenda - The agenda to be accomplished by the action.
outFile - The file to which all STDOUT output is redirected.
errFile - The file to which all STDERR output is redirected.
Returns:
The SubProcess which will fulfill the agenda.
Throws:
PipelineException - If unable to prepare a SubProcess due to illegal, missing or imcompatable information in the action agenda or a general failure of the prep method code.

TEMERITY