PDA

View Full Version : proc jsConstObj syntax error


tymznd
04-03-2003, 11:47 PM
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.

tropistic
04-04-2003, 12:19 AM
Find the "Endname.mel" script that's on the DVD and make sure you put it in your scripts folder too.

Jay

tropistic
04-04-2003, 12:21 AM
Oops - and the jsUnlockTransforms script too. Heck, copy them all there just to be sure - alot of Jason's scripts are linked like that :)

Jay

tymznd
04-04-2003, 01:48 AM
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???

tropistic
04-04-2003, 02:20 AM
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...

tymznd
04-04-2003, 04:08 AM
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.

bigfatMELon
04-04-2003, 07:02 AM
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.

-jl

tymznd
04-04-2003, 07:39 AM
Wow... you were right.... :eek: .....weird

jschleifer
04-05-2003, 08:12 PM
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??

nendo
04-07-2003, 09:23 AM
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.

CGTalk Moderation
01-14-2006, 07:00 PM
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.