CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 05-20-2007, 02:41 PM   #1
Ft. Lauderdale, USA
Join Date: Nov 2006
Posts: 170
Controlling intensities with script

How can I create a window that controls the intensity of all the light in the scene no matter how many there are?
Old 05-20-2007, 11:22 PM   #2
Sick Spider
Sick Spider's Avatar
Join Date: Jun 2002
Posts: 78
Hi, There you go:

global proc wexlerIntLighthUI() { string $win = "intLight"; if (`window -exists $win`) deleteUI -window $win; window -widthHeight 150 220 -title "Int' Light - Wexler Daniel (" $win; columnLayout -adjustableColumn 1; separator; floatSliderGrp -label "int' ?" -cc "wexlerIntLight" -step 0.2 -min 0 -max 5 -field true "howIntLight"; separator; window -e -widthHeight 390 70 $win; showWindow; } global proc wexlerIntLight() { float $setToWhat = `floatSliderGrp -q -v "howIntLight"`; string $allLights[] = `ls -type "light"`; for ($everyLight in $allLights) setAttr ($everyLight+".intensity") $setToWhat; } wexlerIntLighthUI;

The script works with no button, as soon as you change the slider, the Int' of the light will change.
Hope that helps.
What The... !@%#

Last edited by Sick Spider : 05-23-2007 at 06:03 AM.
Old 05-20-2007, 11:22 PM   #3
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 08:00 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.