compositionOrder Class Reference

The compositionOrder JavaScript global object. Extract the Timeline view's composition order. More...

Public Slots

QScriptValue buildDefaultCompositionOrder ()
 Returns an array of Composition objects using the current default composition order as used by the camera view or the timeline. More...
 
QScriptValue buildCompositionOrderForDisplay (String &displayNode)
 Returns an array of Composition objects using the specified display name. More...
 

Detailed Description

The compositionOrder JavaScript global object. Extract the Timeline view's composition order.

Scriptable interface for extracting the Timeline composition order.

or

var composition = compositionOrder.buildCompositionOrderForDisplay( displayNode );

This builds the composition using the node_timeline internal service and return an JavaScript array of CompositionItem object.
The array returned is ordered. The first entry is the top most node in the composition order, or is a parent of nodes.

for( c in composition )
{
var compItem = composition[ c ];
var nodeName = compItem.node;
var nodeDepth = compItem.depth;
var enabledNode = ( node.getEnable( nodeName) == true );
var nodeType = node.type(nodeName);
MessageLog.trace( "Exporting node: " + nodeName + " at depth: " + nodeDepth );
// node at root depth
if( nodeDepth == 0 )
{
// do something for a root node here
}
else
{
// do something for an inner node.
}
if( nodeType == "PEG")
{
// do something for a PEG module
}
else if( nodeType == "READ" )
{
// do something for READ module
}
}
}

Member Function Documentation

◆ buildCompositionOrderForDisplay

QScriptValue compositionOrder::buildCompositionOrderForDisplay ( String &  displayNode)
slot

Returns an array of Composition objects using the specified display name.

This method is similar to buildDefaultCompositionOrder(), however, instead of working with the current display, it requires a display module. This method can be used to generate the composition order from any display module in the project.

Parameters
displayNode: The display module name to build the array of Composition objects from.
Returns
Returns an array of Composition objects using the specified display name.

◆ buildDefaultCompositionOrder

QScriptValue compositionOrder::buildDefaultCompositionOrder ( )
slot

Returns an array of Composition objects using the current default composition order as used by the camera view or the timeline.

Using the current display, return the tree-like composition as normally returned by the internal node_timeline service. This method return the "Display All" composite order.

The depth of each Composition can be used to find the parent-child. Top level nodes or parentless nodes have a depth at 0. Child of this node will have a depth 1 level greater.

Returns
Returns an array of Composition objects using the current default composition order as used by the camera view or the timeline.