SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 19-07-2003, 12: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, 06: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, 12: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
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.