here is the entire script:
CODE
global proc SyntheticLiDARGUICreate()
{
global string $SyntheticLiDARGUI;
$SyntheticLiDARGUI = window -height 500 -title "SyntheticLiDARGUI"
;
rowLayout -numberOfColumns 2 -width 100 MainRow;
columnLayout -width 30 -parent MainRow Column1;
columnLayout -parent MainRow Column2;
setParent Column1;
int $TextHeight = 22;
text -height $TextHeight -label "Phi Start:";
text -height $TextHeight -label "Phi Stop:";
text -height $TextHeight -label "Theta Start:";
text -height $TextHeight -label "Theta Stop:";
text -height $TextHeight -label "Phi Points:";
text -height $TextHeight -label "Theta Points:";
text -height $TextHeight -label "Indicator Radius:";
text -height $TextHeight -label "Type Of Scan:";
text -height $TextHeight -label "Move Scene Every:";
text -height $TextHeight -label "File Path:";
text -height $TextHeight -label "File Name:";
text -height $TextHeight -label "Number of Poses:";
checkBox -label "Show Progress" -value 1 ShowProgress;
setParent Column2;
floatField -editable true -minValue -90 -maxValue 90 -value -45 PhiStart;
floatField -editable true -minValue -90 -maxValue 90 -value 45 PhiStop;
floatField -editable true -minValue -90 -maxValue 90 -value -45 ThetaStart;
floatField -editable true -minValue -90 -maxValue 90 -value 45 ThetaStop;
intField -editable true -minValue 1 -maxValue 200 -value 60 PhiPoints;
intField -editable true -minValue 1 -maxValue 200 -value 60 ThetaPoints;
floatField -editable true -minValue .001 -maxValue 1000 -value .2 IndicatorRadius;
radioCollection radioScanType;
radioButton -label "Uniform Angle" -select radbtnUniformAngle;
radioButton -label "Uniform Linear Spacing" radbtnLinearSpacing;
radioCollection radioMoveScene;
radioButton -label "Strip" radbtnStrip;
radioButton -label "Point" -select radbtnPoint;
textField -width 80 -editable true -tx "c:/data/" FilePath;
textField -width 80 -editable true -tx test FileName;
intField -editable true -minValue 1 -value 10 NumPoses;
button -label "Scan!" -command "LiDARScan";
button -label "Show Boundary" -command "ShowBoundary";
showWindow $SyntheticLiDARGUI;
}
global proc LiDARScan()
{
float $PhiStart=textField -query -text PhiStart
;
float $PhiStop=textField -query -text PhiStop
;
float $ThetaStart=textField -query -text ThetaStart
;
float $ThetaStop=textField -query -text ThetaStop
;
int $PhiPoints=textField -query -text PhiPoints
;
int $ThetaPoints=textField -query -text ThetaPoints
;
float $IndicatorRadius=textField -query -text IndicatorRadius
;
string $selectedScanType = radioCollection -query -select radioScanType
;
string $ScanType;
if($selectedScanType == "radbtnUniformAngle")
$ScanType = "angle";
if($selectedScanType == "radbtnLinearSpacing")
$ScanType = "linear";
if($selectedScanType != "radbtnUniformAngle" && $selectedScanType != "radbtnLinearSpacing")
$ScanType = "invalid";
string $selectedMoveScene = radioCollection -query -select radioMoveScene
;
string $MoveScene;
if($selectedMoveScene == "radbtnStrip")
$MoveScene = "strip";
if($selectedMoveScene == "radbtnPoint")
$MoveScene = "point";
if($selectedMoveScene != "radbtnStrip" && $selectedMoveScene != "radbtnPoint")
$MoveScene = "invalid";
string $FilePath=textField -query -text FilePath
;
string $FileName=textField -query -text FileName
;
string $ShowProgress=checkBox -query -value ShowProgress
;
float $NumPoses=textField -query -text NumPoses
;
SyntheticLiDAR $PhiStart $PhiStop $ThetaStart $ThetaStop $PhiPoints $ThetaPoints $IndicatorRadius $ScanType $MoveScene $FilePath $FileName $ShowProgress $NumPoses;
}
The idea is it collects all the information from the GUI and the very last line calls my plugin command with all the parameters.
If you have any other style comments on this script I'm happy to accept them!
Thanks,
Dave