I am having a problem trying to connect the control of my translate z to move the camera up and down. If any one could help I would be really thankful.
global proc attchMotion ()
{
if (window -exists attchMotionUI)
deleteUI attchMotionUI;
window -t "Attach Camera" attchMotionUI;
columnLayout -adj 1 mainCloumn;
rowColumnLayout -nc 2;
textScrollList -w 200 -h 100 curveTSL;
textScrollList -w 200 -h 100 cameraTSL;
setParent ..;
button -l "Get Curve" -c populateTSL curveTSL;
button -l "Get Camera" -c populateTSL1 cameraTSL;
text -l "Select Curve and Camera";
button -l "Attach Motion Path" -c attach_This;
text -l "Camera Controls";
button -l "Tremble";
controlCam;
showWindow attchMotionUI;
}
proc populateTSL ()
{
textScrollList -e -ra curveTSL;
string $sel[] = ls -type "nurbsCurve";
for ($each in $sel)
textScrollList -e -a $each curveTSL;
}
proc populateTSL1 ()
{
textScrollList -e -ra cameraTSL;
string $sel[] = ls -cameras;
for ($each in $sel)
textScrollList -e -a $each cameraTSL;
}
proc attach_This ()
{
string $selectedCurveInTSL[] = textScrollList -q -si curveTSL;
string $selectedCamerasInTSL[] = textScrollList -q -si cameraTSL;
select $selectedCurveInTSL[0];
select -tgl $selectedCamerasInTSL[0];
pathAnimation -fractionMode true -follow true -followAxis x -upAxis y -worldUpType "vector" -worldUpVector 0 1 0 -inverseUp false -inverseFront false -bank false -startTimeU playbackOptions -query -minTime -endTimeU playbackOptions -query -maxTime;
textScrollList -e -ri $selectedCurveInTSL[0] curveTSL;
}
attchMotion;
proc controlCam ()
{
//Height of Camera//
string $label = text -label "Height" -align "center";
string $field = floatField -min -20.0 -max 20.0 -precision 2;
string $slider = floatSlider -min -20.0 -max 20.0;
string $selectedCamera = textScrollList -q -si cameraTSL;
connectControl $field ( $selectedCamera + ".tz" );
connectControl $slider ( $selectedCamera + ".tz" );
/*
//Rotate Camera//
string $label = text -label "Rotate" -align "center";
string $field = floatField -min 0.0 -max 360.0 -precision 2;
string $slider = floatSlider -min 0.0 -max 360.0;
connectControl $field ( $selectedCamera + ".rotateY" );
connectControl $slider ( $selectedCamera + ".rotateY" );
*/
}