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 19-07-2003, 01:49 AM   #1
Tierackk
Registered User
 
Tierackk's Avatar
 
Join Date: Feb 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Mel Script Help!

I am a bit of an idiot when it comes to loading Mel. Can someone please tell me how to load this script into my shelf. The read me appears when you open it in the script editor. I want to use the duplicate camera so I can zoom into my image plane. I saved it a numerous different ways into my shelf but I always have a syntax error. Please help.



http://www.highend3d.com/maya/mel/?...ction=animation

The script is called "AddCamera V1.0" and the matchmove.mel scirpt is also on the same page.
Tierackk is offline   Reply With Quote
Old 24-07-2003, 07:26 PM   #2
mark_wilkins
Registered User
 
mark_wilkins's Avatar
 
Join Date: Jan 2003
Posts: 161
Thanks: 0
Thanked 1 Time in 1 Post
Default

You don't really want to put this script on your shelf unless you have made a user interface for it, as it requires a camera name on the command line.

Drag both MEL files into somewhere in your script path (usually the maya/scripts directory under your home directory is a good place) and relaunch Maya. Then, type this:

addCameras("persp");

(replacing persp with your camera name)
then hit enter on the numeric keypad. Unless you always run this command on the same camera name, putting it on the shelf wouldn't help you, because you'd have to have a separate button for each camera name.

Of course once you've put the MEL files in your script path you could always drag these lines to your shelf instead:

Code:
string $result = `promptDialog -t "Pick a camera"
                              -m "What camera would you like to add?"
                              -tx "persp"
                              -button "OK" 
                              -button "Cancel" 
                              -defaultButton "OK" 
                              -cancelButton "Cancel"
                              -dismissString "Cancel"`;

if ($result == "OK") {
   string $theCam = `promptDialog -q`;
   print ("Calling addCameras for camera " + $theCam + "\n");
   addCameras($theCam);
}
-- Mark
__________________
Mark R. Wilkins
author of MEL Scripting for Maya Animators
www.melscripting.com
mark_wilkins is offline   Reply With Quote
Old 29-07-2003, 01:08 AM   #3
Tierackk
Registered User
 
Tierackk's Avatar
 
Join Date: Feb 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for taking the time to look into this Mark. I aprreciate your help.
Tierackk is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
MEL headache! happymat27 Members Lounge 5 05-12-2010 09:43 AM
MEL headache!! happymat27 Mel Scripts & Programming 1 03-12-2010 04:41 PM

Thread Tools





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.