This is the same post i did earlier, but now with cry for help
Hi everybody,
I've just entered the world of Mel scripting and i'm trying to create a on/off switch in Mel. It is for switching certain controls visibility on and off. They have been keyed with set driven key under one attribute "AdvFootControl"
I tryed using a if else statement, but it just doesn't do what I want to do. What am I doing wrong???
if("right_Foot_Ctrl.AdvFootControl" == 0)
{
setAttr "right_Foot_Ctrl.AdvFootControl" 1;
}
else
{
setAttr "right_Foot_Ctrl.AdvFootControl" 0;
}
It goes from on too off mode but it won't return it from off too on mode!?
%P
Thnx in advance
I know now the above function won't work soo I tryed this:
if("right_Foot_Ctrl.AdvFootControl" == 0){
setAttr "right_Foot_Ctrl.AdvFootControl" 1;
}else{
if("right_Foot_Ctrl.AdvFootControl" == 1){
setAttr "right_Foot_Ctrl.AdvFootControl" 0;
}
}
But now it won't work at all!?
Now I tryed this:
if("right_Foot_Ctrl.AdvFootControl" == 0){
setAttr "right_Foot_Ctrl.AdvFootControl" 1;
}
else if ("right_Foot_Ctrl.AdvFootControl" == 1){
setAttr "right_Foot_Ctrl.AdvFootControl" 0;
}
and it doesn't WORK *(
created
Mar '11
last reply
Mar '11
- 6
replies
- 3.7k
views
- 1
user
- 1
like