PDA

View Full Version : custom maya shelf


DEVILSAN
10-10-2008, 11:24 PM
Hi today i was building my own custom maya shelf using MEL

I started with
addNewShelfTab "SAN";

it added the shelf with name "SAN" but now i had to add buttons to it to that

points to other mel scripts in my directory names scripts (shelf_SAN/scripts)

that i didnt got
if anyone can show me how to do this using a mel or like just run one mel script
and it adds my shelf and it also includes the mel scripts buttons on it..

as unsuccessful in doing this i tried a different way, iopened other existing
shelf_blabla.mel files to se how shelf code looks like

so i made my own shelf like this


global proc shelf_SAN () {
global string $gBuffStr;
global string $gBuffStr0;
global string $gBuffStr1;


shelfButton
-enableCommandRepeat 1
-enable 1
-width 34
-height 34
-manage 1
-visible 1
-preventOverride 0
-align "center"
-label "IMFCopyGUI"
-labelOffset 0
-font "tinyBoldLabelFont"
-image "icons/riessImfCopyGUI.bmp"
-image1 "icons/riessImfCopyGUI.bmp"
-style "iconOnly"
-marginWidth 1
-marginHeight 1
-command "source \scripts/riessImf_copyGUI.mel;\riessImf_copyGUI;\r"
-sourceType "mel"
-actionIsSubstitute 0
;

}




and so i followed the same method to load my shelf from location where i saved in "my documents/maya 8.5/prefs"

the shelf did get loaded with the error // Warning: File not found: icons/riessImfCopyGUI.bmp

and when i clicked the already added button by my shelf i get this error

source scripts/riessImf_copyGUI.mel;
riessImf_copyGUI;
// Error: source scripts/riessImf_copyGUI.mel;
//
// Error: Syntax error //

while the script i want to link to button is already in my scripts folder which is
"my documents/maya 8.5/prefs/shelf_san/scripts"

so where am i making a mistake..

CGTalk Moderation
10-10-2008, 11:24 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.