Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 06-03-2006, 10:13 PM   #1
JDigital
Registered User
 
JDigital's Avatar
 
Join Date: Mar 2005
Location: Salt Lake City, UT U.S.A.
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default Joint orientation Script

Hey guys I found a great script, some of you may have heard of it.

jsOrientJointUI

It is for joint orientation and I hear it is very helpful.

Well I need some help, I am not sure if anyone can answer this but I am new with MEL scripts and I have gotten them to work before, but for some reason I cant get this one to work. I have it in my scripts folder but when I try to type in jsOrientJointUI in the command line it says "Error: Cannot find procedure jsOrientJointUI"

Any ideas? Thanks so much guys. I am held up on a project because I can't figure out this script! Also if anyone knows of any good tutorials or easy ways to orient joints, that would be great!
JDigital is offline   Reply With Quote
Old 06-03-2006, 11:18 PM   #2
vladimirjp
Subscriber
 
vladimirjp's Avatar
 
Join Date: Jun 2003
Location: stuck in the 90's boston, USA
Posts: 1,871
Thanks: 0
Thanked 4 Times in 3 Posts
Default

u need to source tghe script first.
or restart maya
after install
__________________
Image dump
vladimirjp is offline   Reply With Quote
Old 07-03-2006, 03:46 AM   #3
JDigital
Registered User
 
JDigital's Avatar
 
Join Date: Mar 2005
Location: Salt Lake City, UT U.S.A.
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I appreciate your reply.

I did restart maya but it still didnt work. I have not sourced the script, how would I go about that?

Thanks a ton.
JDigital is offline   Reply With Quote
Old 07-03-2006, 04:18 AM   #4
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Make sure you are typing in the procedure as it appears, i.e., it is case sensitive. For me, If I ever have any doubt as to wether I am typing it correctly, I go to explorer and just copy the file name from there.

Also, if the procedure requires parameters, it will not run without them.

If you restarted Maya, you should not need to source the script.

To do so though, you go into the script editor, Click on

file>source script, then find the file you want to source and click "Open".

When I am working on a programming project, I have a button on my shelf, where I insert code to source ALL the files that are in the scripts director, then whenever I start a new file, I just add it to the list. then whenever I need to source a file, I just press that shelf button.
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote
Old 07-03-2006, 04:26 AM   #5
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
Default

An alternative way to source a file via MEL is type

source "fileName"; in the script editor . . .

You do not have to add the .mel . . . .

Then highlight ( select ) it, and hit the Enter key on the number pad.

If you hit the other enter key, after you select it, it will only dissappear.
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote
Old 07-03-2006, 04:35 AM   #6
JDigital
Registered User
 
JDigital's Avatar
 
Join Date: Mar 2005
Location: Salt Lake City, UT U.S.A.
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You are a genius!! It worked!! Thank you soooo much. I have not been able to work on this project because I couldnt get this MEL script to work.

Thank you so much!!!
JDigital is offline   Reply With Quote
Old 07-03-2006, 04:31 PM   #7
Falott
Registered User
 
Falott's Avatar
 
Join Date: Jan 2005
Location: vienna
Posts: 1,095
Thanks: 3
Thanked 20 Times in 18 Posts
Default

hi, hope you donīt mind using your thread, but itīs kind of the same problem I have. I try to source a little script Iīve written - which did allready work on my machine, but all of a sudden it wont!

I get this error message when trying to execute the script with my shelf button

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

and when trying to source it no prob, but again when executing from shelf SE returns same error.


only after copying all of the code into SE and executing it for the first time the script can be executed from the shelf. but only for the current session. next time - same game. this is making me nuts!


___________


btw, it tried everything what skywola suggested.
__________________
everything starts and ends in the right place at the right time.

Last edited by Falott : 07-03-2006 at 04:34 PM.
Falott is offline   Reply With Quote
Old 07-03-2006, 04:40 PM   #8
Falott
Registered User
 
Falott's Avatar
 
Join Date: Jan 2005
Location: vienna
Posts: 1,095
Thanks: 3
Thanked 20 Times in 18 Posts
Default

sry!!

I turned the procedure into a global procedure. problem solved!
__________________
everything starts and ends in the right place at the right time.
Falott is offline   Reply With Quote
Old 07-03-2006, 04:45 PM   #9
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yep. I've made that mistake before . . .
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote
Old 08-03-2006, 04:22 AM   #10
JDigital
Registered User
 
JDigital's Avatar
 
Join Date: Mar 2005
Location: Salt Lake City, UT U.S.A.
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I noticed that too, how do you turn it to a global procedure? Is it in the code, or in the maya interface?
JDigital is offline   Reply With Quote
Old 08-03-2006, 05:43 AM   #11
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is global :

global proc aliasCommands(){
alias q quadSliderWindow;
alias w getSliderWindow;
};


You just put "global" in front of the procedure declaration.
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote
Old 08-03-2006, 09:16 AM   #12
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Regarding this joint orient script, I am going to post a short tutorial in a new thread for how to toggle a button. I checked this script out and I have been looking for a script that could use a toggle feature, and this one fit the bill. . . .

The good thing about these forums is while I do help a lot of people out with their coding, I also learn a lot just investigating diffirent scripts and issues that come up. It's really great, because I think that we coders who know MEL well, can help others who are not quite as advanced, and eventually, when their level of coding improves, we will be learning new things from them. . . .

It is also great to see that there are some people who are interested in learning MEL, because if you want to push MAYA to the max, you cannot do it without learning MEL!
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote
Old 08-03-2006, 09:55 AM   #13
Falott
Registered User
 
Falott's Avatar
 
Join Date: Jan 2005
Location: vienna
Posts: 1,095
Thanks: 3
Thanked 20 Times in 18 Posts
Default

hope you have plenty of time, cause I have a ton to learn about mel..hehe!

The good thing about these forums is while I do help a lot of people out with their coding, I also learn a lot

thatīs the reason why teachers know so damn well about anything you might not even think about to ask. when they come from university themselves they are University Student Comlete. but after some years they somehow from behind became a fully costumized, provided with tons of different scrips (some of them executing the same thing by different approach), new plugins and with a cool and individual looking environment - Master Of Their Subject Unlimited, cause explanation is exploration of every students creative process of thinking.
__________________
everything starts and ends in the right place at the right time.
Falott is offline   Reply With Quote
Old 08-03-2006, 04:09 PM   #14
JDigital
Registered User
 
JDigital's Avatar
 
Join Date: Mar 2005
Location: Salt Lake City, UT U.S.A.
Posts: 160
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Skywola I think it is great that you are willing to help people out like that. I would really like to learn the coding, it is something I am very interested in and I am just scratching the surface.

I would like to read anything you have on the subject, I know it would be really helpful.
JDigital is offline   Reply With Quote
Old 08-03-2006, 04:58 PM   #15
Falott
Registered User
 
Falott's Avatar
 
Join Date: Jan 2005
Location: vienna
Posts: 1,095
Thanks: 3
Thanked 20 Times in 18 Posts
Default

I browsed through several tuts on MEL and found that "The MEL Companion" is a REAL good starting point. I read it until chapter 3 (starting to practice scripting) at once. allthough it is theory it is highly comprehensible and gave me a basic understanding in the contexts of this scripting language.
__________________
everything starts and ends in the right place at the right time.
Falott is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletinŪ Copyright © 2000-2015, Jelsoft Enterprises Ltd.