Hi,
I have this simple tool that shifts all keyframes. When I run in the script editor, it does not produce error or warning line but the button does not work either.
The remBet() and the addBet() works manually. So I guess the offending procedure is
button -l “-” -w 45 -c (“remBet(” + $customFrames + “)”);
button -l “+” -w 45 -c (“addBet(” + $customFrames + “)”);
The problem is when I use a print command to troubleshoot, all seems good. But again, it does not do anything.
Is there a way around this? Thank you for looking at the problem.
if (`window -exists btRU`){
deleteUI -window btRU;
}
window -title "And/Remove Inbetween"
-wh 300 100
-rtf false
btRU;
columnLayout -adj 1 mainC;
rowColumnLayout -nc 4
rc3;
text -l "Custom Frames " -al "right";
intField -v 0 -w 100 -min 0 cFrames;
$customFrames = `intField -q -v cFrames`;
button -l "-" -w 45 -c ("remBet(" + $customFrames + ")");
button -l "+" -w 45 -c ("addBet(" + $customFrames + ")");
setParent mainC;
showWindow;
//int $addNumber;
global proc addBet (int $addNumber) {
for ($i = 0; $i < $addNumber; ++$i) {
timeSliderEditKeys addInbetween;
}
}
//int $remNumber;
global proc remBet (int $remNumber) {
for ($i = 0; $i < $remNumber; ++$i) {
timeSliderEditKeys removeInbetween;
}
}