SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Lounges / Maya Basics & Newbie Lounge / Mel Script Checker Box
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 25-06-2003, 01:11 PM   #1
Jay
Lead Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,276
Thanks: 41
Thanked 428 Times in 384 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, 02: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, 04:10 PM   #3
Jay
Lead Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,276
Thanks: 41
Thanked 428 Times in 384 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
Click image for larger version

Name:	scriptui.jpg
Views:	103
Size:	75.8 KB
ID:	8301  
Jay is offline   Reply With Quote
Old 25-06-2003, 04: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, 05:03 PM   #5
Jay
Lead Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,276
Thanks: 41
Thanked 428 Times in 384 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, 02: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, 04:20 PM   #7
Jay
Lead Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,276
Thanks: 41
Thanked 428 Times in 384 Posts
Default MelScript

Unfortunately not, can u help?
Jay is offline   Reply With Quote
Old 04-07-2003, 09: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
Click image for larger version

Name:	asjfdhdhf.jpg
Views:	59
Size:	13.9 KB
ID:	8632  
__________________
------------------------------------------------
Alex V. U. Strarup

One mistake can ruin it all...
strarup is offline   Reply With Quote
Old 04-07-2003, 01:42 PM   #9
Jay
Lead Modeler - Framestore
 
Jay's Avatar
 
Join Date: Feb 2003
Location: UK
Posts: 6,276
Thanks: 41
Thanked 428 Times in 384 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, 07: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
Click image for larger version

Name:	ltmeltesto01.jpg
Views:	52
Size:	16.0 KB
ID:	8658  
__________________
------------------------------------------------
Alex V. U. Strarup

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

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.