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 13-02-2007, 12:26 PM   #1
mpepperhouse
Subscriber
 
Join Date: Apr 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Question 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

much appreciated.

Last edited by mpepperhouse : 13-02-2007 at 12:58 PM.
mpepperhouse is offline   Reply With Quote
Old 13-02-2007, 02:11 PM   #2
publicFunction
Senior Software Developer
 
publicFunction's Avatar
 
Join Date: Jan 2005
Location: Livingston, Scotland
Posts: 1,701
Thanks: 1
Thanked 23 Times in 23 Posts
Default

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)
publicFunction is offline   Reply With Quote
Old 15-02-2007, 07:50 AM   #3
mpepperhouse
Subscriber
 
Join Date: Apr 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
mpepperhouse is offline   Reply With Quote
Old 15-02-2007, 07:53 AM   #4
publicFunction
Senior Software Developer
 
publicFunction's Avatar
 
Join Date: Jan 2005
Location: Livingston, Scotland
Posts: 1,701
Thanks: 1
Thanked 23 Times in 23 Posts
Default

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)
publicFunction is offline   Reply With Quote
Old 15-02-2007, 07:57 AM   #5
mpepperhouse
Subscriber
 
Join Date: Apr 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 //
mpepperhouse is offline   Reply With Quote
Old 15-02-2007, 09:07 AM   #6
mpepperhouse
Subscriber
 
Join Date: Apr 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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