[code lang="c"]
// 
// aoKit
// Andrew Odendaal's Maya Script Kit
// Software developed by Andrew Odendaal
// Code compatible with versions 7 - 8.5
//
// Author : Andrew Odendaal
// E-mail : [email protected]
// Website: http://www.andrewodendaal.com
// 

// add attributes to character sets
global proc aoKitAddAttrToCharacterSet()
{
string $aoKitAnswer = `promptDialog -message "Enter Attribute Name:"
-button "Ok"
-button "Cancel"
-defaultButton "Ok"
-cancelButton "Cancel"
-dismissString "Cancel"`;

if ($aoKitAnswer == "Ok")
{
string $aoKitAttrName = `promptDialog -q`;
string $aoKitSelected[] = `ls -sl`;
string $aoKitNewAttr = ($aoKitSelected[1] + "." + $aoKitAttrName);
character -add $aoKitSelected[0] $aoKitNewAttr;
}
else
error "Cancelled by user.";
}
[/code]

Leave a Reply

Your email address will not be published.