Hi guys I'm working on a free script where it contains a lot of nut bolts but I'm having a problem while assigning the command to the button. Actually when I click on this button it should create that nut bolt (as you can see in the screen shot) right now it's not doing anything. Check the command also.
{
// create a window
window -title "jay" -menuBar true -w 220 -h 200 "jay";
// define the layout of controls added
// to the window.
columnLayout;
// create a collapsible frame layout
frameLayout -collapsable true -label "Nuts";
// add the other controls
flowLayout -columnSpacing 1 -w 220 -h 30;
// create six symbol buttons with related mel command
symbolButton -image "Nut.png" -command "donothing";
setParent ..;
// show the window we last created
showWindow;;
}
Replies
Try do -command "print 0"
See if that does something. If it does then you probably just need to pass in a string that drives it all.
It's been a long time since I touched mel so I can't help much more I'm afraid. But what you'd probably have to do, is register your commands to create your objects, IIRC you can just do this by putting the Mel script in the correct folder, so that when you type "nut1" into the console, it would run the script called "nut1.mel" in that directory. Then you can just pass "nut1" as your -command args.
Unless this is what you're already doing, but honestly we'd need to see more of that in order to work out what's going on!