All these great MELs are mostly overwhelming for Ultra-Newbie like myself but is there a MEL or way to have Back, Left and Bottom Orthographic Camera setup in addition to the Default Marking menu every time I start Maya or new scene? I know I can flip the cameras or create new ones but it would be nice to have those from the start(like in Max)
MEL scripts
i`ll copy/paste my post here too… Just to keep mel stuff handy in one place…
Hi all,
I saw this question “how to protect a mb file” recently while reading highend3ds mel section. I wrote a mel script to do this. CalledmbLock`.
After you lock a scene with mbLock, it is not possible to save or export anything
from the scene anymore. Exciting huh!?
you download these files,
http://homepagez.com/boraddd/mblock.zip
http://homepagez.com/boraddd/sampleLockedFile.zip
http://homepagez.com/boraddd/source_mblock.zip
How to use:
- Open the scene you wish to lock
- type
$bypassLock=1in command line - Open up expression editor
- Copy/paste the mblock.mel here
- Hit the Create button
- Now save your scene (make sure you don`t overwrite the orginal scene)
- done.
Everything will go back to normal after you restart Maya
I`ll tell a little more about how it works and what it does for people with strong mel skills.
mbLock works as an expression first of all. It simply replaces some global procedures defined
when Maya boots up with safe(!) ones. so you can not use save, save as or any export features
for the active maya session.(need to restart maya to clean everything up).
The main challange is to keep those dirty mel grus away from hacking mbLock so they cant enable those
features back. To achieve this, mbLock also disables script editor, command line and
expression editor. If you try to open a scene locked with mblock while in prompt mode(maya -prompt)
it kills the Maya process in the memory. Lock will still be active if you try to import or even reference
the locked file in any other scene. So it is quite difficult (but not impossible) to unlock a scene once
it is locked.
Please send your comments and suggestions.
- Also let me know if you can find a way to hack it.I know one, but not going to tell you
Bora,
My friend Doogie onhere, wrote me a great useful script in about 5 minutes. if you duplicate something you want mirrored while modeling, this also will follow the rotate, translations. It is the same thing that have in 3ds max i belive.
global proc pfDupe ()
{
string $curSel[] = ls -sl;
string $dupeObj = $curSel[0] + “_dupe”;
instance -n $dupeObj; scale -1 1 1;
parentConstraint -mo $curSel[0] $dupeObj;
}
pfDupe();
Quick revision of this script to counter the errors that occured when you delete history on the object. Also added a window to control number of divisions. Type alSwitchSmoothWin to get the window
/////////////////////////////////////////////////////////////////
// s w i t c h S m o o t h . m e l
// –
// Anders Langlands 2003
// Ver 2.0
// Revised to stop stupid errors when you delete history
// Added a control window so you can change the number of smoothing divisions
//
// Written in ten minutes to shut those goddamn lightwavers up!
//
// Usage: select your mesh object and run alSwitchSmooth to
// toggle between smoothed/non-smoothed versions. Bind
// to a hotkey (not tab!). To change the level of
// smoothing, change the value of $alSsNumDivisions,
// below.
//
// Known Issues: Does funny stuff when used on components, but
// shouldn’t cause any errors. If it does, e-mail me
//////////////////////////////////////////////////////////////////
global int $alSsNumDivisions = 2;
/////////////////////////////////////////////////////////////
// Do the sh*t!
/////////////////////////////////////////////////////////////
proc alSmoothStuff(string $shp)
{
global int $alSsNumDivisions;
if (attributeExists "iAmSmoothed" $shp)
{
// Object has been swicthsmoothed before
int $isSmoothed = getAttr ($shp+".iAmSmoothed");
if ($isSmoothed)
{
// Object is already smoothed
string $psms[] = listConnections -t polySmoothFace $shp;
if (size($psms) == 0)
{
// oversight! we've deleted the history! we can't unsmooth now so we must
// be wanting to smooth again
$psms = `polySmooth $shp`;
setAttr ($psms[0]+".divisions") $alSsNumDivisions;
setAttr ($shp+".iAmSmoothed") 1;
}
else
{
setAttr ($psms[0]+".divisions") 0;
setAttr ($shp+".iAmSmoothed") 0;
}
}
else
{
// Object has alread been smoothed but is not now
string $psms[] = `listConnections -t polySmoothFace $shp`;
if (size($psms) == 0)
{
// oversight! we've deleted the history! we can't unsmooth now so we must
// be wanting to smooth again
$psms = `polySmooth $shp`;
setAttr ($psms[0]+".divisions") $alSsNumDivisions;
setAttr ($shp+".iAmSmoothed") 1;
}
else
{
setAttr ($psms[0]+".divisions") $alSsNumDivisions;
setAttr ($shp+".iAmSmoothed") 1;
}
}
}
else
{
// Object has not been smoothed before
addAttr -ln "iAmSmoothed" -sn "ias" -at bool $shp;
string $psms[] = `polySmooth $shp`;
setAttr ($psms[0]+".divisions") $alSsNumDivisions;
setAttr ($shp+".iAmSmoothed") 1;
}
}
/////////////////////////////////////////////////////////////
// Wrapper - check the selected objects are right
/////////////////////////////////////////////////////////////
global proc alSwitchSmooth()
{
string $sel[] = ls -sl;
for ($o in $sel)
{
if (nodeType $o == “transform”)
{
string $rels[] = listRelatives -s $o;
string $shp = $rels[0];
alSmoothStuff $shp;
}
else
if (nodeType $o == “mesh”)
{
alSmoothStuff $o;
}
else
{
error “Please select either a mesh shape or its transform”;
}
}
}
/////////////////////////////////////////////////////////////
// Control window
/////////////////////////////////////////////////////////////
global proc alSwitchSmoothWin()
{
if (window -ex alSwitchSmoothWindow) deleteUI alSwitchSmoothWindow;
global int $alSsNumDivisions;
window
-widthHeight 180 85
-title "SwitchSmooth"
alSwitchSmoothWindow
;
frameLayout -l "" -marginWidth 5 mainFrame;
columnLayout -rs 10 mainCol;
intFieldGrp -l "Divisions" -value1 $alSsNumDivisions -cc "$alSsNumDivisions = `intFieldGrp -q -v1 divisionsF`;" -cl2 "left" "left" -ct2 "left" "left" -cw2 80 80 divisionsF;
setParent mainCol;
button -label "SwitchSmooth" -c "alSwitchSmooth" -width 160 -height 30;
showWindow alSwitchSmoothWindow;
}
This is a really simple script, but everyone seems to need to do it. This script checks to see if a window exists, if it does, it deletes it.
proc checkWindow(string $windowName)
{
if (window -ex $windowName)
deleteUI $windowName;
}
anyone seen that script that would find if you had triangles on your model? i think it would find ngons also…i always found that relaly helpful. i cant find it on cgtalk anymoer though. anyone have a link or just the script?
Well, this isn’t a MEL, but I’ve been starting with the API, and I made this for someone else, so hopefully it could help someone else out. The plugin adds a value to a float or integer attribute. It works with objects, polygon vertices, or Nurbs CV’s. If you had a ball, you could add 3 to the translate X by running:
adding ball.translateX 3
or
adding ball.vtx[3] 1 3 -.5
With a nurbs surface “ball”:
adding ballShape.cv[2][5] 1 2 -3.5
Go to
www.geocities.com/ajk48n/Plugins
The zip file has the source code and the file adding.mll for Maya 5.0 and adding45.mll for Maya 4.5
I’m just starting with Maya’s API, so the plugin has limitations, but it does work. I tested running it 100,000 times, against running setAttr and getAttr. The plugin ran in about 26 seconds, while the MEL commands took about 56.
There’s also a help file to show how to use the command.
Feel free to modify the code, and send any suggestions or advice to ffsmailing@yahoo.com.
Hi… Nice thread… has more than I expected…
any bdy let me know a way of making particles flow on a given curve? without using curveflow? I had posted this in the dynamics section but had no results.
I know it could be done with Mel but Im not an expert at that (any way trying to learn!!) so Im here to bother some bdy who might come up with some cool sctript or some suggetion.
THX…bye
Hello,
that’s a small mel to create a channel speed and acceleration from any selected channel of any selected node.
Some time it’s very usefull.
code :
// SpAccChannel.mel Add channel Speed and/or Acceleration for selected objects on selected channels
//Bruno Dekeijser 2000 12 11
global proc SpAccChannel()
{
string $channelist[]=channelBox -q -sma mainChannelBox;
string $curcha;
string $selectlist[]=ls -sl;
string $current;
for ($current in $selectlist)
{
for ($curcha in $channelist)
{
// addAttr Channels Speed
string $chsns = $curcha+“s”;
string $chlns = $curcha+“Speed”;
string $curchsns = $current+"."+$chsns;
print ("
add channels Speed and Acceleration on “+$curchsns);select -cl; select $current;
addAttr -at “float” -ln $chlns -sn $chsns -k 1 $current;
string $expname = (“exp”+$current+$chlns);
string $expadd = “float $valcurcha = getAttr "+$current+"."+$curcha+";
“;
$expadd = $expadd+“float $valcurcha2 = getAttr -time (frame-1) "+$current+"."+$curcha+";
“;
$expadd = $expadd+$curchsns+” = abs($valcurcha - $valcurcha2);”;
expression -s ($expadd) -o $current -ae 1 -uc all -n $expname;
// addAttr Channels Acceleration
string $chsna = $curcha+“a”;
string $chlna = $curcha+“Acc”;
string $curchsna = $current+”.”+$chsna;
print (” “+$curchsna+”
");select -cl; select $current;
addAttr -at “float” -ln $chlna -sn $chsna -k 1 $current;
$expname = (“exp”+$current+$chlna);
$expadd = "float $valcurcha = getAttr "+$current+"."+$curcha+";
";
$expadd = $expadd+"float $valcurcha1 = getAttr -time (frame-1) "+$current+"."+$curcha+";
";
$expadd = $expadd+“float $valcurcha2 = getAttr -time (frame-2) "+$current+"."+$curcha+";
“;
$expadd = $expadd+$curchsna+” = ($valcurcha2 - $valcurcha1)-($valcurcha1 - $valcurcha);”;
expression -s ($expadd) -o $current -ae 1 -uc all -n $expname;
}
}
}
Bruno Dekeijser
Animation setup Maya
bruno@movida3d.com
just made a little annotation script, nothing special but the first useful thing I’ve written 
string $selection[] = `ls -sl` ; // current selection
int $objectcounter = size($selection) ; // number of objects selected
int $i ; // for-loop counter
print($objectcounter + " Objects selected.") ;
for($i = 0; $i <= $objectcounter; $i++)
{
float $pos_x = `getAttr ($selection[$i] + ".translateX")` ;
float $pos_y = `getAttr ($selection[$i] + ".translateY")` ;
float $pos_z = `getAttr ($selection[$i] + ".translateZ")` ;
annotate -tx $selection[$i] -p $pos_x ($pos_y + 5) $pos_z $selection[$i] ;
}
oh yea, just select some kind of object and then use the script 
Hi all, Ive updated my poly / budget count to include texture budgets, and it also writes out at .bud file so you dont have to re-enter info.
More of a use to those game makers out there.
Simply place both scripts in your scripts folder and type:
“jl_budget_count;” in your maya command prompt.
http://www.johnlomax.com/jl_budget_count.zip
- John
Hi
This is my second mel script. “Global Polygon Smooth Control V2”
Firstly, I created a mel about poly\smooth divisions att. for poly objects in the scene.
And I added “Smooth on render” property in V2. I want to help from Mr. Bryan Ewert for the property. I hope you like it. 
Thanks to Bryan Ewert for help on “Smooth on Render” property.
Click here to download .rar file.
/****************************************************************************************
Global Polygon Smooth Control For Maya 5 Version 2.0
Author: Safak Oner © 2003
safak@safakoner.com
www.safakoner.com
History
V 1.0 = Global Polygon Smooth Control
V 2.0 = Added “Smooth on Render” property
Run Command = equinox_gpsc;
*****************************************************************************************/
global proc equinox_gpsc()
{
if (window -q -exists dfs) deleteUI dfs;
window -w 152 -h 210 -menuBar true -title “equinox_gpsc” -iconName “equinox_gpsc” dfs;
menu -label "About" -tearOff true;;
menuItem -label "About..." -command "about_proc";
//--------------------------------------------------------------------------------
//-- UI
columnLayout;
frameLayout -l "Smooth Level" -cll true -borderStyle "in" -h 163 -w 145;
rowColumnLayout -nc 2 -width 170 -cw 1 70 -cw 2 70 ;
text -label "On Scene" -fn "boldLabelFont" -align "center";
text -label "On Render" -fn "boldLabelFont" -align "center";
button -label "0 - Reset" -w 40 -h 25-command "equinox_gpsc_os 0";
button -label "0 - Reset" -w 40 -h 25-command "equinox_gpsc_or 0";
button -label "1" -w 20 -h 25-command "equinox_gpsc_os 1";
button -label "1" -w 20 -h 25-command "equinox_gpsc_or 1";
button -label "2" -w 20 -h 25-command "equinox_gpsc_os 2";
button -label "2" -w 20 -h 25-command "equinox_gpsc_or 2";
button -label "3" -w 20 -h 25-command "equinox_gpsc_os 3";
button -label "3" -w 20 -h 25-command "equinox_gpsc_or 3";
button -label "4" -w 40 -h 25-command "equinox_gpsc_os 4";
button -label "4" -w 40 -h 25-command "equinox_gpsc_or 4";
setParent..;
setParent..;
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
showWindow dfs;
}
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
//-- COMMANDS
global proc equinox_gpsc_os( int $param )
{
string $psl[] = ls -type polySmoothFace;
for ($i in $psl)
{
setAttr ($i + “.divisions”) $param;
}
}
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
global proc equinox_gpsc_or( int $param )
{
if ( $param > 0 )
{
string $preCommand;
string $postCommand;
string $sor[] = `ls -type polySmoothFace`;
for ($i in $sor)
{
int $divisions = `getAttr ( $i + ".divisions" )`;
$preCommand = $preCommand +
"setAttr " + $i + ".divisions "
+ $param + ";";
$postCommand = $postCommand +
"setAttr " + $i + ".divisions "
+ $divisions + ";";
}
setAttr -type "string" defaultRenderGlobals.preRenderMel
$preCommand;
setAttr -type "string" defaultRenderGlobals.postRenderMel
$postCommand;
}
else
{
setAttr -type "string" defaultRenderGlobals.preRenderMel ("");
setAttr -type "string" defaultRenderGlobals.postRenderMel ("");
}
}
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
proc about_proc()
{
confirmDialog -title “About Equinox Tools” -message "Equinox Tools
GPSC V 2.0
Global Polygon Smooth Control
Safak Oner Computer Graphics
http://www.safakoner.com
safak@safakoner.com
Thanks to Bryan Ewert for Help
http://www.ewertb.com
"
-ma “center”
-button “Ok” -defaultButton “Yes”
-cancelButton “No” -dismissString “No”;
}
//--------------------------------------------------------------------------------
//--------------------------------------------------------------------------------
//-- END SCRIPT
Hey Levitateme,
Just so your dupe can work across scale as well:
global proc pfDupe()
{
string $curSel[] = ls -sl;
string $dupObj = $curSel[0] + “_dupe”;
instance -n $dupObj; scale -r -1 1 1;
//relative flag so that your object doesn’t scale down if original isn’t 1 1 1.
parentConstraint -mo $curSel[0] $dupObj;
scaleConstraint -mo $curSel[0] $dupObj;
}
pfDupe();

Hi
Orient joint quickly
/*********************************************
Orient Joint Version 1 For Maya 5
Author: Safak Oner © 2003
safak@safakoner.com
www.safakoner.com
Run Command = equinox_oj;
*************************************/
global proc equinox_oj()
{
if (window -q -exists oj_w) deleteUI oj_w;
window -w 90 -h 140 -menuBar true -title “Equinox OJ” -iconName “Equinox OJ” oj_w;
menu -label “Window” -tearOff false;;
menuItem -label “Reset Size” -command “window -e -w 194 -h 134 oj_w;”;
menuItem -divider true;
menuItem -label “About…” -command “about_oj_w”;
columnLayout;
frameLayout -l " Orient Joint" -cll true -borderStyle "in" -h 87 -w 186;
rowColumnLayout -numberOfColumns 3 -cw 1 60 -cw 2 60 -cw 3 60;
text -label "X" -align "center" -fn "tinyBoldLabelFont";
text -label "Y" -align "center" -fn "tinyBoldLabelFont";
text -label "Z" -align "center" -fn "tinyBoldLabelFont";
button -label "90" -w 40 -h 25-command "ojx_90";
button -label "90" -w 20 -h 25-command "ojy_90";
button -label "90" -w 20 -h 25-command "ojz_90";
button -label "- 90" -w 40 -h 25-command "ojx_n90";
button -label "- 90" -w 20 -h 25-command "ojy_n90";
button -label "- 90" -w 20 -h 25-command "ojz_n90";
setParent..;
setParent..;
showWindow oj_w;
}
global proc ojx_90()
{
rotate -r -os 90 0 0;
}
global proc ojy_90()
{
rotate -r -os 0 90 0;
}
global proc ojz_90()
{
rotate -r -os 0 0 90;
}
global proc ojx_n90()
{
rotate -r -os -90 0 0;
}
global proc ojy_n90()
{
rotate -r -os 0 -90 0;
}
global proc ojz_n90()
{
rotate -r -os 0 0 -90;
}
global proc about_oj_w()
{
confirmDialog -title “About Equinox Tool” -message "Orient Joint V 1
Equinox Tools
Safak Oner Computer Graphics
http://www.safakoner.com
safak@safakoner.com
"
-ma “center”
-button “Ok” -defaultButton “Yes”
-cancelButton “No” -dismissString “No”;
}
//-- END OF SCRIPT
Here is a quick script I whipped up at someones request.
From the script header:
/*
mhShaderPalette.mel - v1.0
by: Mike Hovland
mhovland@midwaygames.com
This script creates a window with 15 separate color swatches. Clicking on a color swatch will create a shader
of that color, and apply it to the current selection (faces or entire object). If the shader already exists,
it will apply the existing shader.
If you want to edit the colors feel free. You will need to make changes in a few places.
The colors swatches are defined in this manner
string $can1 = canvas -w 25 -h 25 -rgb 1 0 0 -pc "mhApplyShaderToSelection RedShader 1 0 0" redCanvas;
You will need to change the following values
-rgb <r, g, b> //This is the color of the swatch in the interface
-pc “mhApplyShaderToSelection <New Name for the Shader> <r, g, b>” <New Maya internal name of the color swatch> //This is the command to apply the shader to the selection
Enjoy!
*/
Equinox | Image Plane Creator | Beta
/*
//–Equinox Tool Name © 2003
Image Plane Creator
//–Version
Beta
For Maya 5.1
//–Author
Safak Oner
//–Web Site
www.safakoner.com
//–E-mail
safak@safakoner.com
//–History
V 1.0 = 12.2003
//–Run Command
eq_ipc;
*/
global proc eq_ipc()
{
if (`window -q -exists ipc_w`) deleteUI ipc_w;
window -menuBar true -maximizeButton false -title " Equinox | Image Plane Creator | Beta" -iconName " Equinox | IPC" -widthHeight 378 259 ipc_w;
menu -label "Window" -tearOff false;;
menuItem -label "Reset Size" -command "window -e -w 387 -h 259 ipc_w;" re_s;
menuItem -divider true;
menuItem -label "About..." -command "aba";
columnLayout ;
frameLayout -label " Planes" -cll true -width 380 fl_planes;
columnLayout -cat "both" 10 -rs 5 -cw 385;
rowColumnLayout -nc 6 -cw 1 75 -cw 2 65 -cw 3 40 -cw 4 65 -cw 5 45 -cw 6 65;
text -l "Front Plane" -fn "boldLabelFont" -align "left";
checkBox -v true -l "Create" -onc "on_front" -ofc "off_front" cb_front;
text -l " Width";
floatField -minValue -0.1 -maxValue 500 -v 1.0 f_w;
text -l " Height";
floatField -minValue -0.1 -maxValue 500 -v 1.0 f_h;
text -l "Side Plane" -fn "boldLabelFont" -align "left";
checkBox -v true -l "Create" -onc "on_side" -ofc "off_side" cb_side;
text -l " Width";
floatField -minValue -0.1 -maxValue 500 -v 1.0 s_w;
text -l " Height";
floatField -minValue -0.1 -maxValue 500 -v 1.0 s_h;
text -l "Top Plane" -fn "boldLabelFont" -align "left";
checkBox -v false -l "Create" -onc "on_top" -ofc "off_top" cb_top;
text -l " Width";
floatField -en false -minValue -0.1 -maxValue 500 -v 1.0 t_w;
text -l " Height";
floatField -en false -minValue -0.1 -maxValue 500 -v 1.0 t_h;
text -vis 0 -l "Options"; text -vis 0 -l ""; text -vis 0 -l ""; text -vis 0 -l ""; text -vis 0 -l ""; text -vis 0 -l "";
separator -style "single"; separator -style "single"; separator -style "single"; separator -style "single"; separator -style "single"; separator -style "single";
text -vis 0 -l ""; text -vis 0 -l ""; text -vis 0 -l ""; text -vis 0 -l ""; text -vis 0 -l ""; text -vis 0 -l "";
text -l "Attribute E." -fn "boldLabelFont" -align "left";
checkBox -v false -l "Not Open" -onc "on_ae" -ofc "off_ae" o_ae;
text -vis 0 -l ""; text -vis 0 -l ""; text -vis 0 -l ""; text -vis 0 -l ""; text -vis 0 -l "";
setParent..;
rowColumnLayout -nc 1 -cw 1 355;
button -l "Create Plane (s)" -ann "Create Plane (s)" -c "c_p" b_c_p;
button -l "Delete Plane (s)" -vis 0 -ann "Delete Plane (s)" -c "d_p" b_d_p;
setParent..;
setParent..;
setParent..;
frameLayout -label " Reference Images" -vis 0 -cll true -width 380 fl_img;
columnLayout -cat "both" 3 -rs 5 -cw 376;
rowColumnLayout -nc 2 -cw 1 80 -cw 2 355;
text -l " Front Image" -vis 0 -fn "boldLabelFont" -align "left" t_f;
attrColorSliderGrp -vis 0 -cw 1 1 -cw 2 60 -l "" m_f;
text -l " Side Image" -vis 0 -fn "boldLabelFont" -align "left" t_s;
attrColorSliderGrp -vis 0 -cw 1 1 -cw 2 60 -l "" m_s;
text -l " Top Image" -vis 0 -fn "boldLabelFont" -align "left" t_t;
attrColorSliderGrp -vis 0 -cw 1 1 -cw 2 60 -l "" m_t;
setParent..;
setParent..;
setParent..;
frameLayout -label " Global Scale" -vis 0 -cll true -width 380 fl_scl;
columnLayout -cat "both" 3 -rs 5 -cw 376;
rowColumnLayout -nc 3 -cw 1 50 -cw 2 230 -cw 3 80;
text -l " Scale" -fn "boldLabelFont" -align "left" t_scl;
floatSliderGrp -field true -v 1 -cw 1 10 -cw 2 50 -cw 3 50 -l "" s_f;
button -l "Finish" -w 120 -ann "Finish" -c "fin_p" ;
setParent..;
showWindow ipc_w;
if(`objExists REF_Planes`)
{
button -e -vis 1 b_d_p;
button -e -en false b_c_p;
warning " | Equinox Warning | : Existing Object = \" REF_Planes \"
";
}
else
{
window -e -w 387 -h 259 ipc_w;
}
}
global proc on_front()
{
floatField -e -en true f_w;
floatField -e -en true f_h;
}
global proc off_front()
{
floatField -e -en false f_w;
floatField -e -en false f_h;
}
global proc on_side()
{
floatField -e -en true s_w;
floatField -e -en true s_h;
}
global proc off_side()
{
floatField -e -en false s_w;
floatField -e -en false s_h;
}
global proc on_top()
{
floatField -e -en true t_w;
floatField -e -en true t_h;
}
global proc off_top()
{
floatField -e -en false t_w;
floatField -e -en false t_h;
}
global proc on_ae()
{
checkBox -e -l " Open" o_ae;
}
global proc off_ae()
{
checkBox -e -l “Not Open” o_ae;
}
global proc c_p()
{
if(`objExists REF_Planes`)
{
warning " | Equinox Warning | : Existing Object = \" REF_Planes \"
";
}
else
{
if( `checkBox -q -v cb_front` ) {
polyPlane -w 1 -h 1 -sx 1 -sy 1 -ax 0 1 0 -tx 1 -ch 1;
string $CurSel[]=`ls -sl`;
rename $CurSel[0] Front_Plane;
setAttr "Front_Plane.rotateX" 90;
float $f_w_val = `floatField -q -v f_w`;
float $f_h_val = `floatField -q -v f_h`;
setAttr ("Front_Plane.scaleX") $f_w_val;
setAttr ("Front_Plane.scaleZ") $f_h_val;
string $frontLamb = `shadingNode -asShader lambert`;
select Front_Plane;
hyperShade -assign $frontLamb;
rename $frontLamb REF_Front;
frameLayout -e -vis 0 fl_planes;
frameLayout -e -vis 1 fl_img;
text -e -vis 1 t_f;
attrColorSliderGrp -e -vis 1 -at "REF_Front.color" m_f;
} else {
}
if( `checkBox -q -v cb_side` ) {
polyPlane -w 1 -h 1 -sx 1 -sy 1 -ax 0 1 0 -tx 1 -ch 1;
string $CurSel[]=`ls -sl`;
rename $CurSel[0] Side_Plane;
setAttr "Side_Plane.rotateZ" 90;
float $s_w_val = `floatField -q -v s_w`;
float $s_h_val = `floatField -q -v s_h`;
setAttr ("Side_Plane.scaleX") $s_w_val;
setAttr ("Side_Plane.scaleZ") $s_h_val;
string $sideLamb = `shadingNode -asShader lambert`;
select Side_Plane;
hyperShade -assign $sideLamb;
rename $sideLamb REF_Side;
frameLayout -e -vis 0 fl_planes;
frameLayout -e -vis 1 fl_img;
text -e -vis 1 t_s;
attrColorSliderGrp -e -vis 1 -at "REF_Side.color" m_s;
} else {
}
if( `checkBox -q -v cb_top` ) {
polyPlane -w 1 -h 1 -sx 1 -sy 1 -ax 0 1 0 -tx 1 -ch 1;
string $CurSel[]=`ls -sl`;
rename $CurSel[0] Top_Plane;
float $t_w_val = `floatField -q -v t_w`;
float $t_h_val = `floatField -q -v t_h`;
setAttr ("Top_Plane.scaleX") $t_w_val;
setAttr ("Top_Plane.scaleZ") $t_h_val;
string $topLamb = `shadingNode -asShader lambert`;
select Top_Plane;
hyperShade -assign $topLamb;
rename $topLamb REF_Top;
frameLayout -e -vis 0 fl_planes;
frameLayout -e -vis 1 fl_img;
text -e -vis 1 t_t;
attrColorSliderGrp -e -vis 1 -at "REF_Top.color" m_t;
} else {
}
window -e -w 387 -h 198 ipc_w;
select -cl;
group -em -n REF_Planes;
connectControl s_f REF_Planes.sx REF_Planes.sy REF_Planes.sz;
select REF_Planes;
createDisplayLayer -name "REF_Planes_L";
layerEditorLayerButtonTypeChange REF_Planes_L;
layerEditorLayerButtonTypeChange REF_Planes_L;
frameLayout -e -vis 1 fl_scl;
menuItem -e -command "window -e -w 387 -h 198 ipc_w;" re_s;
if(`checkBox -q -v o_ae`)
{
openAEWindow;
}
else
{
}
if (`objExists Front_Plane`)
{
parent Front_Plane REF_Planes;
}
else
{
}
if (`objExists Side_Plane`)
{
parent Side_Plane REF_Planes;
}
else
{
}
if (`objExists Top_Plane`)
{
parent Top_Plane REF_Planes;
}
else
{
}
select REF_Planes;
fitPanel -selected;
string $currentPanel = `getPanel -withFocus`;
string $panelType = `getPanel -to $currentPanel`;
if ($panelType == "modelPanel"){
modelEditor -edit -da "smoothShaded" -displayTextures on -dl "default" $currentPanel;
print " | Equinox Feedback | : Reference Image Plane(s) Created
";
}
}
}
global proc d_p()
{
if (`objExists "REF_Front"`)
{
delete REF_Front;
}
else
{
}
if (`objExists "REF_Side"`)
{
delete REF_Side;
}
else
{
}
if (`objExists "REF_Top"`)
{
delete REF_Top;
}
else
{
}
//--
if (`objExists "REF_Planes"`)
{
delete REF_Planes;
}
else
{
}
if (`objExists "REF_Planes_L"`)
{
layerEditorDeleteLayer REF_Planes_L;
}
else
{
}
button -e -en 1 b_c_p;
button -e -vis 0 b_d_p;
print " | Equinox Feedback | : Existing Object Deleted
";
}
global proc fin_p()
{
select REF_Planes;
fitPanel -selected;
makeIdentity -apply true -t 1 -r 1 -s 1;
select -cl;
window -e -w 387 -h 259 ipc_w;
menuItem -e -command “window -e -w 387 -h 259 ipc_w;” re_s;
deleteUI ipc_w;
print " | Equinox Feedback | : Process Finished
";
}
global proc aba()
{
int $about_eq_ipc = 250;
if ( window -exists about_eq_ipc ) deleteUI about_eq_ipc;
window
-menuBar true
-maximizeButton false
-resizeToFitChildren false
-title " About Equinox Tools"
-iconName " About Equinox Tools"
-wh 300 325
about_eq_ipc;
menu -label "Window" -tearOff false;;
menuItem -label "Reset Size" -command "window -e -w 300 -h 325 about_eq_ipc;";
menuItem -divider true;
menuItem -label "Visit www.safakoner.com" -command "showHelp -a \"http://www.safakoner.com/index.htm\"";
string $form_l = `formLayout -numberOfDivisions 100`;
string $scroll_l =`scrollLayout -hst 16 -vst 16 -childResizable true -minChildWidth $about_eq_ipc`;
columnLayout -adjustableColumn true -rowSpacing 5;
text -label " Equinox Tool Name : " -fn "boldLabelFont" -align "left";
text -label " Image Plane Creator" -align "left";
text -label " Version : " -fn "boldLabelFont" -align "left";
text -label " Beta" -align "left";
separator -style "single";
text -label " Author : " -fn "boldLabelFont" -align "left";
text -label " Safak Oner" -align "left";
text -label " Web Site : " -fn "boldLabelFont" -align "left";
text -label " http://www.safakoner.com" -align "left";
text -label " E-mail : " -fn "boldLabelFont" -align "left";
text -label " [email]safak@safakoner.com[/email]" -align "left";
setParent ..;
setParent ..;
string $button_close = `button -label "Close" -command "deleteUI about_eq_ipc"`;
formLayout -edit
-attachForm $scroll_l "top" 4
-attachForm $scroll_l "left" 4
-attachControl $scroll_l "bottom" 4 $button_close
-attachForm $scroll_l "right" 4
-attachNone $button_close "top"
-attachForm $button_close "left" 4
-attachForm $button_close "bottom" 4
-attachForm $button_close "right" 4
$form_l;
showWindow about_eq_ipc;
}
Orient Joint V1.5 :bounce:
/*
//Equinox Tool Name © 2003
Orient Joint
//Version
1.5
For Maya 5.1
//Author
Safak Oner
//Web Site
www.safakoner.com
//E-mail
safak@safakoner.com
//History
V 1.0 = 10.2003
V 1.5 = 11.2003
“Show Axis” Added
//Run Command
eq_oj;
*/
global proc eq_oj()
{
if (window -q -exists oj_w) deleteUI oj_w;
window -w 110 -h 214 -menuBar true -maximizeButton false -title " EQ" -iconName " Equinox OJ" oj_w;
menu -label "Window" -tearOff false;;
menuItem -label "Reset Size" -command "window -e -w 110 -h 214 oj_w;";
menuItem -divider true;
menuItem -label "About..." -command "about_oj_w";
columnLayout;
frameLayout -l "Display Axis" -cll true -borderStyle "in" -h 80 -w 104;
columnLayout -columnAttach "both" 3 -rowSpacing 3 -columnWidth 99;
button -label "Show" -w 70 -h 25 -command "s_on";
button -label "Hide" -w 70 -h 25 -command "s_off";
setParent..;
setParent..;
frameLayout -l " Orient Joint" -cll true -borderStyle "in" -h 87 -w 104;
rowColumnLayout -numberOfColumns 3 -cw 1 33 -cw 2 33 -cw 3 33;
text -label "X" -align "center" -fn "tinyBoldLabelFont";
text -label "Y" -align "center" -fn "tinyBoldLabelFont";
text -label "Z" -align "center" -fn "tinyBoldLabelFont";
button -label "90" -w 40 -h 25-command "ojx_90";
button -label "90" -w 20 -h 25-command "ojy_90";
button -label "90" -w 20 -h 25-command "ojz_90";
button -label "- 90" -w 40 -h 25-command "ojx_n90";
button -label "- 90" -w 20 -h 25-command "ojy_n90";
button -label "- 90" -w 20 -h 25-command "ojz_n90";
setParent..;
setParent..;
showWindow oj_w;
}
global proc s_on()
{
string $iksc[] = ls -type joint;
for ($i in $iksc)
setAttr ($i + “.displayLocalAxis”) 1;
}
global proc s_off()
{
string $iksc[] = ls -type joint;
for ($i in $iksc)
setAttr ($i + “.displayLocalAxis”) 0;
}
global proc ojx_90()
{
rotate -r -os 90 0 0;
}
global proc ojy_90()
{
rotate -r -os 0 90 0;
}
global proc ojz_90()
{
rotate -r -os 0 0 90;
}
global proc ojx_n90()
{
rotate -r -os -90 0 0;
}
global proc ojy_n90()
{
rotate -r -os 0 -90 0;
}
global proc ojz_n90()
{
rotate -r -os 0 0 -90;
}
global proc about_oj_w()
{
int $about_oj_w_W = 250;
if ( window -exists about_oj_w ) deleteUI about_oj_w;
window
-menuBar true
-maximizeButton false
-resizeToFitChildren false
-title " About Equinox Tools"
-iconName " About Equinox Tools"
-wh 300 325
about_oj_w;
menu -label "Window" -tearOff false;;
menuItem -label "Reset Size" -command "window -e -w 300 -h 325 about_oj_w;";
menuItem -divider true;
menuItem -label "Visit www.safakoner.com" -command "showHelp -a \"http://www.safakoner.com/index.htm\"";
string $form_l = `formLayout -numberOfDivisions 100`;
string $scroll_l =`scrollLayout -hst 16 -vst 16 -childResizable true -minChildWidth $about_oj_w_W`;
columnLayout -adjustableColumn true -rowSpacing 5;
text -label " Equinox Tool Name : " -fn "boldLabelFont" -align "left";
text -label " Orient Joint" -align "left";
text -label " Version : " -fn "boldLabelFont" -align "left";
text -label " 1.5" -align "left";
separator -style "single";
text -label " Author : " -fn "boldLabelFont" -align "left";
text -label " Safak Oner" -align "left";
text -label " Web Site : " -fn "boldLabelFont" -align "left";
text -label " http://www.safakoner.com" -align "left";
text -label " E-mail : " -fn "boldLabelFont" -align "left";
text -label " [email]safak@safakoner.com[/email]" -align "left";
setParent ..;
setParent ..;
string $button_close = `button -label "Close" -command "deleteUI about_oj_w"`;
formLayout -edit
-attachForm $scroll_l "top" 4
-attachForm $scroll_l "left" 4
-attachControl $scroll_l "bottom" 4 $button_close
-attachForm $scroll_l "right" 4
-attachNone $button_close "top"
-attachForm $button_close "left" 4
-attachForm $button_close "bottom" 4
-attachForm $button_close "right" 4
$form_l;
showWindow about_oj_w;
}
Hi all
I have some new and rebuild mel script. I hope, you like my scripts :bounce:
Smooth Proxy with Side by Side V2.0|
Download
How can I use this mel ? DivX avi
UI

Skeleton Renamer V1.0
Download
How can I use this mel ? DivX avi
UI

Image Plane Creator V1.0
Download
How can I use this mel ? DivX avi
UI





