Harmony
Scripting Interface Documentation
compositionOrder Class Reference

The compositionOrder JavaScript global object. Extract timeline composition order. More...

Public Slots

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

Detailed Description

The compositionOrder JavaScript global object. Extract timeline composition order.

Scriptable interface for extracting the timeline composition order.

var composition = composition.buildDefaultCompositionOrder() or
var composition = composition.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);
System.println( "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

return an array of Composition object using the specified display name.

This method is similar to buildDefaultCompositionOrder(), howeer, 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

◆ buildDefaultCompositionOrder

QScriptValue compositionOrder::buildDefaultCompositionOrder ( )
slot

returns an array of Composition object 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. Nodes that are at the same depth,