Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 19-07-2003 , 12:49 AM
Tierackk's Avatar
Registered User
Join Date: Feb 2003
Posts: 3

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.



https://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.

# 2 24-07-2003 , 06:26 PM
mark_wilkins's Avatar
Registered User
Join Date: Jan 2003
Posts: 161
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
# 3 29-07-2003 , 12:08 AM
Tierackk's Avatar
Registered User
Join Date: Feb 2003
Posts: 3
Thanks for taking the time to look into this Mark. I aprreciate your help.

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads