Maya Training

Creating characters In Maya and Zbrush

Maya Training

Creating character renders in Maya 2017 and Arnold

Maya Training

Spach-Alspaugh House the complete courseware
You are here > Home > SimplyMaya Community Forums

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
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.

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
Registered User
mark_wilkins's Avatar
Join Date: Jan 2003
Posts: 161
Thanks: 0
Thanked 1 Time in 1 Post

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:


(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:

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");
-- Mark
Mark R. Wilkins
author of MEL Scripting for Maya Animators
mark_wilkins is offline   Reply With Quote
Old 29-07-2003, 01:08 AM   #3
Registered User
Tierackk's Avatar
Join Date: Feb 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

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

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-2017 SimplyMaya - vBulletin® Copyright © 2000-2017, Jelsoft Enterprises Ltd.