The selection JavaScript global object. Retrieve information about the nodes or columns that are selected.
More...
The selection JavaScript global object. Retrieve information about the nodes or columns that are selected.
function dumpSelectedColumn()
{
var i;
for (i = 0; i < ncol; ++i)
{
var f;
for (f = 1; f <= nframe; ++f)
{
if (keyframe) value += " (keyframe)";
}
}
}
◆ addColumnToSelection
bool selection::addColumnToSelection |
( |
String |
column | ) |
|
|
slot |
Add a column to the selection.
returns whether columns was located and successfully added to the selection
- Parameters
-
◆ addDrawingColumnToSelection
bool selection::addDrawingColumnToSelection |
( |
String |
columnName | ) |
|
|
slot |
Adds the drawing column and it's associated read node to the selection.
- Parameters
-
columnName | : The displayed name of column. |
- Returns
- Returns true if the drawing column and associated read node are added to the selection.
◆ addNodesToSelection
void selection::addNodesToSelection |
( |
QScriptValue |
nodes | ) |
|
|
slot |
Adds an array of nodes to the selection.
- Parameters
-
nodes | : An array containing the qualified name of nodes to be selected. |
◆ addNodeToSelection
bool selection::addNodeToSelection |
( |
String |
node | ) |
|
|
slot |
Adds a node to the selection.
- Parameters
-
node | : The name of node to add to the selection. |
- Returns
- Returns whether node was located and successfully added to the selection.
◆ addSubSelectionForNode
bool selection::addSubSelectionForNode |
( |
String & |
node, |
|
|
QScriptValue & |
subSelection |
|
) |
| |
|
slot |
Selects/deselects a set of IDs from the sub selection.
Select a set of sub objects. If the sub object is already selected, this method will deselect it.
var mySelectionFile =
System.
getenv(
"TEMP") +
"/myHarmonySelection_001.json";
var myFile = new PermanentFile(mySelectionFile);
myFile.open(1);
var jsonFileContent = myFile.read();
myFile.close();
var newSelection = JSON.parse(jsonFileContent);
- Parameters
-
node | : The path to the node (ex: "Top/MyNode"). |
subSelection | : An array of sub object IDs or the id (integer) of one sub object. |
- Returns
- Returns true if successful.
◆ addWaypointToSelection
bool selection::addWaypointToSelection |
( |
String |
waypoint | ) |
|
|
slot |
Add a waypoint to the selection.
returns whether waypoint was located and successfully added to the selection
- Parameters
-
waypoint | qualified name of waypoint |
◆ clearSelection
bool selection::clearSelection |
( |
| ) |
|
|
slot |
Clears the selection.
- Returns
- Returns true if successful.
◆ clearSubSelectionForNode
bool selection::clearSubSelectionForNode |
( |
String & |
node | ) |
|
|
slot |
Clears all the sub selection on the given node.
- Parameters
-
node | : The path to the node (ex: "Top/MyNode"). |
- Returns
- Returns true if the sub selection was cleared, false if the node path was invalid or if the node wasn't selected.
◆ extendSelectionWithColumn
bool selection::extendSelectionWithColumn |
( |
String |
columnName | ) |
|
|
slot |
Adds the column to the selection. If the column is a drawing column, also adds the associated read node to the selection.
- Parameters
-
columnName | : The displayed name of column. |
- Returns
- Returns true if the column was successfully added to the selection.
◆ isSelectionRange
bool selection::isSelectionRange |
( |
| ) |
|
|
slot |
Returns true if the selection has a range.
- Returns
- Returns true if the selection has a range.
◆ numberOfColumnsSelected
int selection::numberOfColumnsSelected |
( |
| ) |
|
|
slot |
Returns a value for the number of columns selected in the xsheet.
- Returns
- Returns a value for the number of columns selected in the xsheet.
◆ numberOfFrames
int selection::numberOfFrames |
( |
| ) |
|
|
slot |
Returns the number of selected frames.
- Returns
- Returns the number of selected frames.
◆ numberOfNodesSelected
int selection::numberOfNodesSelected |
( |
| ) |
|
|
slot |
Returns the number of nodes that are selected.
- Returns
- Returns the number of nodes that are selected.
◆ removeNodeFromSelection
bool selection::removeNodeFromSelection |
( |
String |
node | ) |
|
|
slot |
Removes a node from the selection.
- Parameters
-
node | : The name of node to be removed from the selection. |
- Returns
- Returns whether node was located and successfully removed from the selection.
◆ removeWaypointFromSelection
bool selection::removeWaypointFromSelection |
( |
String |
waypoint | ) |
|
|
slot |
Remove a waypoint from the selection.
returns whether waypoint was located and successfully removed from the selection
- Parameters
-
waypoint | qualified name of waypoint |
◆ selectAll
void selection::selectAll |
( |
| ) |
|
|
slot |
Selects all nodes and all columns in the scene.
◆ selectedColumn
String selection::selectedColumn |
( |
int |
i | ) |
|
|
slot |
Returns the ith column selected in the xsheet.
- Parameters
-
i | : The index of the column. |
- Returns
- Returns the ith column selected in the xsheet.
◆ selectedNode
String selection::selectedNode |
( |
int |
i | ) |
|
|
slot |
Returns the path of the selected node.
- Parameters
-
i | : The index of the node. |
- Returns
- Returns the path of the selected node.
◆ selectedNodes
QScriptValue selection::selectedNodes |
( |
| ) |
|
|
slot |
Returns an Array of all selected nodes.
- Returns
- Returns an Array of all selected nodes.
◆ selectedWaypoint
String selection::selectedWaypoint |
( |
int |
i | ) |
|
|
slot |
Returns the path of the selected waypoint.
- Parameters
-
i | : The index of the waypoint. |
- Returns
- Returns the path of the selected waypoint.
◆ selectedWaypoints
QScriptValue selection::selectedWaypoints |
( |
| ) |
|
|
slot |
Returns an Array of all selected waypoints.
- Returns
- Returns an Array of all selected waypoints.
◆ setSelectionFrameRange
void selection::setSelectionFrameRange |
( |
int |
start, |
|
|
int |
length |
|
) |
| |
|
slot |
Sets the selection frame range.
- Parameters
-
start | : The beginning frame. |
length | : The number of frames selected. |
◆ startFrame
int selection::startFrame |
( |
| ) |
|
|
slot |
Returns the selected start frame.
- Returns
- Returns the selected start frame.
◆ subSelectionForNode
QScriptValue selection::subSelectionForNode |
( |
String & |
node | ) |
|
|
slot |
Obtains the IDs of the selectable sub objects of the given node.
if(selectedNodeCount != 1)
return;
var newSelection = new Object;
var mySelectionFile =
System.
getenv(
"TEMP") +
"/myHarmonySelection_001.json";
var myFile = new PermanentFile(mySelectionFile);
myFile.open(2);
myFile.write(JSON.stringify(newSelection));
myFile.close();
- Parameters
-
node | : The path to the node (ex: "Top/MyNode"). |
- Returns
- Returns an Array containing the IDs of the selected node.