Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   Mel Script Checker Box (https://simplymaya.com/forum/showthread.php?t=6518)

Jay 25-06-2003 01:11 PM

Mel Script Checker Box
 
Hi People

I've just started to get into mel and have written a script that helps with your lights. What I need to do is is put that little checker icon on the texture navigation box but I'm banging my head on the keyboard at the moment on how to write it. I've had a look at other scripts but I'm none the wiser at present.

Can anyone help me. If they can and succeed I'll send them a copy of it when its done. Many thanx!!

kbrown 25-06-2003 02:55 PM

texture navigation box???

So you want a button with an icon instead of a text label?
If yes then you could use the symbolButton command. Basically you use it like a normal button but with the -image flag you assign an image or icon to the button.

Jay 25-06-2003 04:10 PM

Mel Script
 
1 Attachment(s)
I'm a bit confuuuuused as always.I've attached an image so you know what I mean. Thanx again

kbrown 25-06-2003 04:19 PM

With what command did you create those controls?

Jay 25-06-2003 05:03 PM

Hi KB

Really appreciate this;

attrFieldSliderGrp -min(-1) -max 10 -at ($current + ".intensity");

text " ";

columnLayout;

setParent;

attrColorSliderGrp -at ($current + ".color");

strarup 03-07-2003 02:10 PM

Hi Jango,

have you solved the problem?

regards

Strarup

Jay 03-07-2003 04:20 PM

MelScript
 
Unfortunately not, can u help?

strarup 04-07-2003 09:38 AM

1 Attachment(s)
Hi Jango,

I can try... but I need some more info... what's the purpose of the function/button is it e.g. something like the code hereunder or more something like the attached image?

this is an example from the Maya Docs "iconTextButton.html"...
--------------------------------------------------------------
string $window = `window`;
columnLayout -adjustableColumn true;
iconTextButton -style "textOnly"
-image1 "sphere.xpm" -label "sphere";
iconTextButton -style "iconOnly"
-image1 "spotlight.xpm" -label "spotlight";
iconTextButton -style "iconAndTextHorizontal"
-image1 "cone.xpm" -label "cone";
iconTextButton -style "iconAndTextVertical"
-image1 "cube.xpm" -label "cube";
showWindow $window;
---------------------------------------------------------------

regards

Strarup

Jay 04-07-2003 01:42 PM

Mel Script
 
Hi Strarup

Thanx for getting back to me. Its the top checker box that I need,
basically for navigating to the materials, texture nodes etc.
Its to finish the my script really then its ready for use. I dont want it being incomplete or 'naked' if you know what I mean.

strarup 04-07-2003 07:37 PM

1 Attachment(s)
Hi Jango,

oki doki... :)

you can e.g. try this... create a light e.g. a Directional Light... and then execute the follwing code...
then you should get a window as the one in the attached picture...

hope it helps you... :)

//-------------------------------------------------------------------
//modify color and intensity for the selected light
string $lightnameA[] = `ls -lt`;
window -title "Test";
columnLayout;
for ($lightname in $lightnameA)
{
attrColorSliderGrp -attribute ($lightname +".color");
attrFieldSliderGrp -attribute ($lightname + ".intensity")
- min -1 -max 10;
}
setParent ..;
showWindow;
//-------------------------------------------------------------------

regards

Strarup


All times are GMT. The time now is 11:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018