Maya 2020 fundamentals - modelling the real world
Get halfway through a model and find it's an unworkable mess? Can't add edge loops where you need them? Can't subdivide a mesh properly? If any of this sounds familiar check this course out.
# 1 13-02-2007 , 01:26 PM
Subscriber
Join Date: Apr 2006
Posts: 32

mel scripts

hi,
i downloaded the plane explosion tutorial and there are mel scripts that come with it. the thing is i do not know how to load these into maya so they appear in the shelf? can someone help me with this? a notepad file says to set the project to this file but i tried with no joy. what am i doing wrong?

update: i have managed to get it onto the shelf by copying and pasting the script into the script editor. i then saved it to the shelf but, when i click on it, it says synatx error. i tried again and then, just nothing happened.
where am i going wrong....thanks user added image

much appreciated. user added image


Last edited by mpepperhouse; 13-02-2007 at 01:58 PM.
# 2 13-02-2007 , 03:11 PM
publicFunction's Avatar
Senior Software Developer
Join Date: Jan 2005
Location: Livingston, Scotland
Posts: 1,701
Try running the scripts on there own and not thru the shelf. If you get the same issue, then it's time for some reverse engneering of the script. IF not then remove the MEL icons from the shelf and recreate them.


Chris (formerly R@nSiD)
Twitter
When the power of love overcomes the love of power the world will truely know peace - Jimmy Hendrix
Winner SM VFX Challenge 1
3rd Place SM SteamPunk Challenge (May 2007)
# 3 15-02-2007 , 08:50 AM
Subscriber
Join Date: Apr 2006
Posts: 32
hi, thanks for replying.
i deleted the icons on the shelf and started again, but still getting a syntax error.
i do not know anything about scripting so can you tell me what reverse engineering means?
as i say it is the mel script i downloaded from this website for the explosion tutorial.

thanks user added image

# 4 15-02-2007 , 08:53 AM
publicFunction's Avatar
Senior Software Developer
Join Date: Jan 2005
Location: Livingston, Scotland
Posts: 1,701
I don't have that tutorial, so I cant access the MEL script. Reverse engineering would require good knowledge of MEL. In the script editor can you copy and paste the error in full.


Chris (formerly R@nSiD)
Twitter
When the power of love overcomes the love of power the world will truely know peace - Jimmy Hendrix
Winner SM VFX Challenge 1
3rd Place SM SteamPunk Challenge (May 2007)
# 5 15-02-2007 , 08:57 AM
Subscriber
Join Date: Apr 2006
Posts: 32
this is the script.....i cant say i know what any of it means.....i have maya.6.5




//detachSeparate.mel v1.1
//Jeff Dobson 7/2/01
//jeffdobs@swbell.net
//
//DESCRIPTION: This script will effectively detach and separate selected faces from a poly mesh.
//Advantages of this script over Maya's built in detach/separate is that this script doesn't create
//a third parent node. It also allows you to break off only the selected faces as opposed to exploding
//every sub-mesh of an object.
//SETUP: Create a shelf button or hotkey with the command detachSeparate;
//ICON: detachSeparate.bmp
//HISTORY: 7/20/01 - v1.1 -- Changed duplicate command to -un from -rr. Fixes bug that leaves an extra
// shape node when script is run on an object with an extrude in its history.


global proc detachSeparate()
{
string $nameSplitSkip[];
string $faceNum[];
string $temp[];
string $newObj[];
string $newFaceSel[];

string $origFaceSel[] = `filterExpand -ex 1 -sm 34`;
string $origObjShape[] = `listRelatives -p $origFaceSel`;
string $origObj[] = `listRelatives -p $origObjShape`;

//Get my selected face numbers into $faceNum
for ($step = 0, $skip = 0; $step < size($origFaceSel); $step++, $skip++)
{
tokenize $origFaceSel[$step] "." $temp;
$nameSplitSkip[$skip] = $temp[0];
$skip++;
$nameSplitSkip[$skip] = $temp[1];
clear $temp;
}

for ($step2 = 0, $skip2 = 1; $step2 < (size($nameSplitSkip)/2); $step2++, $skip2 = $skip2 + 2)
{
$faceNum[$step2] = $nameSplitSkip[$skip2]; //every other value
}

//Dupe original object
$newObj = `duplicate -un $origObj[0]`;
delete -ch $newObj[0];
string $newAllFaces[] = `ls ($newObj[0] + ".f[*]")`;

//Make new array for face selection on $newObj
for ($step3 = 0; $step3 < size($faceNum); $step3++)
{
$newFaceSel[$step3] = ($newObj[0] + "." + $faceNum[$step3]);
}
;
// Error: //
// Error: Syntax error //

# 6 15-02-2007 , 10:07 AM
Subscriber
Join Date: Apr 2006
Posts: 32
i have tried a new mel script and the same happens. there must be something i am doing wrong but have no ida what. perhaps not installing it correctly....hmmm, puzzles me user added image

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