Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 25-06-2003 , 01:11 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287

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!!

# 2 25-06-2003 , 02:55 PM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
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.


Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
# 3 25-06-2003 , 04:10 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287

Mel Script

I'm a bit confuuuuused as always.I've attached an image so you know what I mean. Thanx again

Attached Thumbnails
# 4 25-06-2003 , 04:19 PM
kbrown's Avatar
Moderator
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
With what command did you create those controls?


Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
# 5 25-06-2003 , 05:03 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287
Hi KB

Really appreciate this;

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

text " ";

columnLayout;

setParent;

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

# 6 03-07-2003 , 02:10 PM
Subscriber
Join Date: Jan 2003
Location: Denmark
Posts: 338
Hi Jango,

have you solved the problem?

regards

Strarup


------------------------------------------------
Alex V. U. Strarup

One mistake can ruin it all...
# 7 03-07-2003 , 04:20 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287

MelScript

Unfortunately not, can u help?

# 8 04-07-2003 , 09:38 AM
Subscriber
Join Date: Jan 2003
Location: Denmark
Posts: 338
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

Attached Images

------------------------------------------------
Alex V. U. Strarup

One mistake can ruin it all...
# 9 04-07-2003 , 01:42 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287

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.

# 10 04-07-2003 , 07:37 PM
Subscriber
Join Date: Jan 2003
Location: Denmark
Posts: 338
Hi Jango,

oki doki... user added image

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... user added image

//-------------------------------------------------------------------
//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

Attached Images

------------------------------------------------
Alex V. U. Strarup

One mistake can ruin it all...
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads