Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 25-06-2003, 02:11 PM   #1
Jay
Senior Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,234
Thanks: 39
Thanked 425 Times in 381 Posts
Default 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!!
Jay is offline   Reply With Quote
Old 25-06-2003, 03:55 PM   #2
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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!
kbrown is offline   Reply With Quote
Old 25-06-2003, 05:10 PM   #3
Jay
Senior Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,234
Thanks: 39
Thanked 425 Times in 381 Posts
Default Mel Script

I'm a bit confuuuuused as always.I've attached an image so you know what I mean. Thanx again
Attached Thumbnails
 
Jay is offline   Reply With Quote
Old 25-06-2003, 05:19 PM   #4
kbrown
Moderator
 
kbrown's Avatar
 
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts
Default

With what command did you create those controls?
__________________
Kari
- My Website
- My IMDB

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote
Old 25-06-2003, 06:03 PM   #5
Jay
Senior Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,234
Thanks: 39
Thanked 425 Times in 381 Posts
Default

Hi KB

Really appreciate this;

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

text " ";

columnLayout;

setParent;

attrColorSliderGrp -at ($current + ".color");
Jay is offline   Reply With Quote
Old 03-07-2003, 03:10 PM   #6
strarup
Subscriber
 
Join Date: Jan 2003
Location: Denmark
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Jango,

have you solved the problem?

regards

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

One mistake can ruin it all...
strarup is offline   Reply With Quote
Old 03-07-2003, 05:20 PM   #7
Jay
Senior Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,234
Thanks: 39
Thanked 425 Times in 381 Posts
Default MelScript

Unfortunately not, can u help?
Jay is offline   Reply With Quote
Old 04-07-2003, 10:38 AM   #8
strarup
Subscriber
 
Join Date: Jan 2003
Location: Denmark
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 Thumbnails
 
__________________
------------------------------------------------
Alex V. U. Strarup

One mistake can ruin it all...
strarup is offline   Reply With Quote
Old 04-07-2003, 02:42 PM   #9
Jay
Senior Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,234
Thanks: 39
Thanked 425 Times in 381 Posts
Default 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.
Jay is offline   Reply With Quote
Old 04-07-2003, 08:37 PM   #10
strarup
Subscriber
 
Join Date: Jan 2003
Location: Denmark
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Attached Thumbnails
 
__________________
------------------------------------------------
Alex V. U. Strarup

One mistake can ruin it all...
strarup is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
MEL headache! happymat27 Members Lounge 5 05-12-2010 09:43 AM
MEL headache!! happymat27 Mel Scripts & Programming 1 03-12-2010 04:41 PM

Thread Tools





A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.