View Full Version : Area Light setup
06-06-2006, 08:24 AM
I've been working on a little script, let me explain it :
You select a group of polygons which make an open (like all the sides polygons of a door or a window), then you use the script and an Area Light should appear in the center of it with the right scale and orientation.
I made that to train myself at coffee, just for fun.
My problem is, that everything works well for the creation of the lights and it's position but when it comes to scale it, the Y value of the light can't be changed whereas the X value is good.
I hope everything was explain well with my english level.
Here is the sample code of the light modification :
var container = lum->GetContainer();
The X and Y scales values are good since I can control them on the console, but even with a random value the Y scale don't want to change.
I don't know what to do, I tried a lot of things so if a code master is there, please help me :).
Thanks in advance.
06-06-2006, 08:47 AM
Sounds great. That wil save a lot of time with placing the light.
Only I can't help you with this.
The only coffee I can handle is the one you can drink..
06-06-2006, 11:37 AM
Eh eh :D,
Thanks anyway for your comments ! I hope to finish the script soon and then i'll make it as a button to add in the C4D's layout for everyone who need it.
06-06-2006, 11:50 AM
Hi Daubermman, not sure why this isn't working , something odd going on. You do not need to access an objects container to set its parameters, you can use the # operator instead, which is easier.
lum#LIGHT_TYPE = light_type_area;
lum#LIGHT_AREADETAILS_SIZEY = ty;
lum#LIGHT_AREADETAILS_SIZEX = tx;
This does work.
06-06-2006, 02:27 PM
Didn't know this way to acces datas, but I must say a HUGE thank you !
It's working like that as you said, so now I can go on, and I'll use this as a button soon, thanks again.
Didn't know this way to acces datas, but I must say a HUGE thank you !.
You're welcome. The # operator is documented under the list of changes in the 9.5 sdk. I recommend you have a quick read of it.
06-06-2006, 02:50 PM
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.