Daubermman
06-06-2006, 08:24 AM
Hello everyone,
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();
container->SetData(LIGHT_TYPE,light_type_area);
container->SetData(LIGHT_AREADETAILS_SIZEY,ty);
container->SetData(LIGHT_AREADETAILS_SIZEX,tx);
lum->SetContainer(container) ;
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.
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();
container->SetData(LIGHT_TYPE,light_type_area);
container->SetData(LIGHT_AREADETAILS_SIZEY,ty);
container->SetData(LIGHT_AREADETAILS_SIZEX,tx);
lum->SetContainer(container) ;
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.
