Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Learning what Autodesk scripts do?
  RSS 2.0 ATOM  

Learning what Autodesk scripts do?
Rate this thread
 
45863
 
Permlink of this thread  
avatar
  • funwit3d
  • Posted: 02 August 2010 12:38 PM
  • Total Posts: 14
  • Joined: 24 August 2008 01:54 AM

Ok here goes .Kind of a crazy question for everyone and hopefully people can answer this one.I am not a coder by any means at all .I am a fairly new noob to mel scripting and wanting to learn about how autodesk does things will mel I have been looking into going through the maya scripts .Since there are so dam many scripts in the script folder I was wondering if its possible to find out what each one does .I only ask because I would like to create a rig controller colorizer which will change the color of a nurbs controller like the way you can by enabling the overrides and draging the slider .And I am curious as to what script that is in the autodesk maya script folder but cant find it anywehre .Any Ideas.

Thanks
Best way to learn is looking how you guys do it .



Replies: 0
avatar
  • THNKR
  • Posted: 02 August 2010 01:25 PM

watch what “echo all commands” gives you and do whatIs on anything you don’t understand.

for example I saw

changeObjColor curveShape1.overrideColor
updateLayerColor curveShape1.overrideColor

when I changed the color, so I could figure out

whatIs changeObjColor;
// Result: Mel procedure found in: /Applications/Autodesk/maya2011/Maya.app/Contents/scripts/AETemplates/AEdrawInfo.mel //

and then noticed that these procs actually change the slider but the argument made sense after I saw

global proc updateLayerColor (string $layerColorAttr, string $colorCtrl)
{
// check to set the correct initial settings
int $color = getCurrentColor( $layerColorAttr );
colorIndexSliderGrp -e -v $color $colorCtrl;
}

so that I knew I had to do

setAttr “curveShape1.overrideEnabled” 1;
setAttr “curveShape1.overrideColor” 13;



Replies: 1
/img/forum/dark/default_avatar.png

Could you give some advice for me on how to get inside of learning Mel?I get this big problem because of lacking of learning computer language.Thank you for the replying!

Author: DustCentury

Replied: 27 March 2011 08:54 PM  
avatar
  • Cyrus3v
  • Posted: 05 August 2010 09:58 PM

Great tip THNKR. Very useful that command.



Replies: 0