/
setMarkerConnection

setMarkerConnection

Description

Sets a connecting line between two markers in the scene.

If the two markers already have a connecting line, the color of the line is updated (if different).

If multiple markers by the given names exist (e.g. when two characters are in the scene), the markers parented under the Priority Search module are connected.

To set connecting lines for multiple characters in the scene, run your connecting script after setting the Priority Search module to each character.

Connecting lines are used for visual grouping of markers and have no intrinsic affect on the marker data.

Functional area

Data editing

Command syntax

Syntax

setMarkerConnection "sourceNode" "targetNode" [-color integer integer integer] [-priorityOnly]

Arguments

Name Type Required Comments
targetMarker string yes Name of the marker to draw the line to.
sourceMarker string yes Name of the marker to draw the line from.

Flags

Name Flag arguments Argument type Exclusive to Comments
color 3 integer Set the RGB color of the marker connection
priorityOnly 0 Set the connection between markers parented to the priority search module only.

Return value

void

Examples

// Draw connecting lines around the four head markers of each
// character in the scene.
int $i, $count; 
string  $chars[] = `getModules -type Character`;
 
// Get the number of characters in the scene
$count = `getCount $chars`;
 
// Iterate through and set the connections for each.
for( $i = 0; 
$i < $count; $i += 1 )
{
// Set the Priority Search Module. Do this by first setting
// it as the primary selection, then calling setPriority 
setPrimary $chars[ $i ];
setPriority;  
 // Now set the connections
setMarkerConnection "LFHD" "LBHD" -color 0 255 0;
setMarkerConnection "LBHD" "RBHD" -color 0 255 0; 
setMarkerConnection "RBHD" "RFHD" -color 0 255 0;
setMarkerConnection "RFHD" "LFHD" -color 0 255 0;
}

Additional information

Related commands