proc jsConstObj syntax error


I purchased Jason’s DVD and am trying to use what I believe to be the script that constrains an object to another without shifting its original position.

The script that I am trying to use is “jsConstObj”…but I am getting:
proc jsConstObj;
// Error: proc jsConstObj; //
// Error: Syntax error //

I am on a mac and am looking at the code to see what I can find… and what I think is going is that it is not finding the other js procs that are in the scripts folder??

jsMakeConstObj locator3 "locator1 locator2 ";
// Error: Cannot find procedure “endName”. //

cause then I enter the endName in manually and I get:

jsMakeConstObj locator3 "locator1 locator2 ";
// Error: Cannot find procedure “jsUnlockTransforms”. //

I went into Unix to make sure that the file name extension (".mel") were correct and they are.


Find the “Endname.mel” script that’s on the DVD and make sure you put it in your scripts folder too.



Oops - and the jsUnlockTransforms script too. Heck, copy them all there just to be sure - alot of Jason’s scripts are linked like that :slight_smile:



What I am trying to say is that ALL the scripts are there… they are not being recognized. At first I thought that it might be a Unix/mac issue, where I wasn’t seeing the real extensions on the file… i.e. “.mel”

so the file might look something like this “endName.mel” to OSX,
but through Unix you would see “endName.mel.txt”
…and therefore Maya wouldn’t find it

But I don’t think that is the case cause I went in throught the terminal (Unix) and verified the file name extentions… anyone have ideas???


The .mel extension isn’t required for a script, but anything other than .mel causes the proc(s) to not be found on my system too(Windows.)

What happens if you directly source the Endname/Unlocktransforms/ConstObj scripts through the script editor with “Echo All Commands” turned on? Any error messages?

That really should work…


What happens if you directly source the Endname/Unlocktransforms/ConstObj scripts through the script editor

Yes, when I enter it in manually (via the script editor) everything works as expected… that is why I think it is something to do with simple file recognition.


If it were a case of file recognition, sourcing it wouldn’t work either. Restart Maya and try it again. It may be a simple case of sourcing confusion.



Wow… you were right… :eek: …weird


glad it’s working… I’ve found that problem with maya as well sometimes where for some reason maya won’t source the scripts unless you re-start… strange, eh??


yes that’s true Jason !
Few month ago you gave me the idea (or the will) to make my on script (and by the way inproving my mel scripting ) to build skeleton procedurally with a system based on locator.
At that time I experimented the same problem, Maya did not update variables or did not source script and there were no way to clear memory from Maya unless to restart Maya !
And now I prefer to restart Maya regularly when I am writing and testing new scripts.


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.