/
createShelfButton

createShelfButton

Description

Creates a button on the named tab. If the called tab doesn't exist, it creates a new tab.

Shelf buttons are interface objects that contain script commands. The scripts contained in them may be invoked by pressing the button. Shogun Post saves the current button shelf configuration in a script called ScriptShelves.hsl.

Functional area

Interface

Command syntax

Syntax

createShelfButton "TabName"[-group string] [-label string] [-script string] [-tip string] [-icon string] [-iconIndex integer] [-language string] [-update]

Arguments

NameTypeRequiredComments
TabNamestring
String name of tab to place button on

Flags

NameFlag argumentsArgument typeExclusive toComments
group1string
label1stringGives the button this label. Should be 8 characters or less
script1stringString arguments in your script text should be preceded by the escape character \ as in \"string argument\"
tip1stringSets the tip text that will appear when the mouse hovers over the button
icon1stringSpecifies the path to the icon file
iconIndex1integerDeprecated. (Icons cannot be picked by index.)
language1stringSets whether the script used by the button is Python or HSL.
update0Deprecated. (Shelf now always redrawn).

Return value

void

Examples

createShelfButton -label "getBones" -script "string $bones[]; 
$bones  = `getModules -type \"BoneNode\"`; 
int $num = `getCount $bones`; 
print $num;"-tip "This command will return the number of BoneNodes in the scene";
 
// This script creates a button called "getBones" and adds it to the
// last button group. When invoked, it returns the number of BoneNodes
// in the scene. Note that the string after -script is contained within quotes. 
// The \" means that there is a special character. In this case it is a 
// quotation mark ""`. 

Additional information

Related commands


© Copyright Vicon Motion Systems. All rights reserved.

Vicon trademarks