Troubleshooting Norman Ik/Fk Matching

I’ve gotten a lot of emails from people having trouble using the mlAutoIkFk.mel script that is downloaded with Norman. Pretty much everyone who has an issue gets this error:

// Error: line 1: Cannot find procedure "mlAutoIKFK".

The real problem is actually a typo in the readme pdf. The procedure that you call should be mlAutoIkFk, with lower case ‘k’s. That should be enough to get you working again, but if you want to know more, read on.

If you have this kind of problem with scripts in the future, there’s a couple easy things you can do to troubleshoot it. First of all, a simple background on how Maya’s MEL scripts work. Before a procedure in a script is run, it needs to be sourced. You can think of that sort of like taking a block of code in a file, and turning it into a single command. Normally you would have to source a specific file, but Maya has a little shortcut, that allows you to source and run a procedure in one step, as long as the file is named after the procedure. This is how most scripts are published and used, for the most part you don’t even realize it’s happening.

So your first clue to figuring out why Maya can’t find this procedure is to look at the name of the MEL file, which is mlAutoIkFk.mel (with the lower-case ‘k’s). That means that if the author did everything right, the primary command should be the same thing, just without the .mel extension. And that will work, in this case.

If you want to be absolutely sure, the next step would be to open up the file in a text editor, and find the procedure. Procedures that are run outside of the script file will be on a line starting with “global proc.” In this case, that line is the first line of code after the notes, and looks like this:

global proc mlAutoIkFk ()

Here you can see that the procedure name you should be using is, again, mlAutoIkFk. A lot of scripts will have many global procs, in that case your best guess will probably be informed by what they’re named, and usually the most user friendly one will be the one that doesn’t have anything in the parenthesis () at the end. That space is for arguments, which is extra information that the script needs in order to run.

I don’t have the original pdf document to edit, and I don’t want to rewrite the readme, but I left a comment on the Norman site that will hopefully clarify. But it never hurts to learn more about MEL, or any tool that you use. Happy animating!

Share Button
This entry was posted in Maya, MEL, Norman, Tools. Bookmark the permalink.

One Response to Troubleshooting Norman Ik/Fk Matching

  1. Eric Emard says:

    this is the perfect fix. Thanks so much for getting back to us and putting this online!


Leave a Reply

Your email address will not be published. Required fields are marked *