Selection

With the Selection functions, you can retrieve information about the modules or columns you have selected within a view. These functions work best if run from an icon in the Views Toolbar

Following are the Selection functions:

clearSelection
addDrawingColumnToSelection
addColumnToSelection
addNodeToSelection
extendSelectionWithColumn
numberOfCellColumnsSelected
numberOfColumnsSelected
numberOfFramesSelected
numberOfNodesSelected
pointEaseIn
selectedCellColumn
selectedNode
setSelectionFrameRange

Example

This script prints the name of the selected columns and their frame values to the shell.

function dumpSelectedColumn()

{

/* The numberOfCellColumnsSelected function loops to check all of the selected columns and determine their frame values.

The selectedCellColumn function prints the name of the selected column to the shell and then loops through the values in the column to print them as well. */

var ncol = selection.numberOfCellColumnsSelected();

var nframe = frame.numberOf();

var i;

for (i = 0; i < ncol; ++i)

{

var f;

var c = selection.selectedCellColumn(i);

System.println("Column " + c);

for (f = 1; f <= nframe; ++f)

{

var value = column.getEntry(c, 1, f);

var keyframe = column.isKeyFrame(c, 1, f);

if (keyframe) value += " (keyframe)";

System.println(" " + f + ": " + value);

}

}

}

Related Topics 

Scripting Reference