ERROR: Cannot find procedure


#1

Hi everyone, first post here!

we are 2 young 3D artists just starting with rigging and scripting, and we have a problem. We created a Fk-Ik match script and it all works (wooow), and now we are trying to create a WINDOW with a button for every match script (ex: leg 1 ik to fk, leg 1 fk to ik, leg 2…)
BUT: when we create the procedure and we press the button, we get the ERROR: Cannot find procedure.

WE HAVE NO IDEA WHY!

our script looks like nothing’s wrong, but still… not working.
We tried with proc and global proc, no difference.

ES:

// Match Fk L Leg 1 to Ik
proc test(){
$L_leg1Snap1 = xform -query -worldSpace -rotation L_leg1_JNT_FK_Snap_1;
}

if(window -ex matchApp)
deleteUI matchApp;

window matchApp;

frameLayout -l “Match IK/FK”

columnLayout;
    text  -align center -l "Il Miracolo della Libellula";
    separator -horizontal true;
    
    rowColumnLayout -numberOfColumns 2;
        
        button -l "Left Leg 1 FK to IK" -c "test()"; 

showWindow matchApp;

Thanks in advance!

P.S. we have maya 2014


#2

EDIT: Nevermind what I wrote here before

It seems to be working here. I mean, I’m getting an error because I don’t have the joint on my scene, but it is definitely reading through the proc.