Skip to main content
JesB-SsPV8V
Inspiring
October 6, 2013
Answered

How to change light type?

  • October 6, 2013
  • 1 reply
  • 904 views

Does anyone know how to change light type?

What happens is that I have a button that I would want to create a Point light, but it just create a spot light.

Does anyone know how to change it to create a point light?

My code is:

//Add a Point Light to active Comp

       addLightCtrl.onClick = function(){

           var pointLight = proj.layers.addLight("Light", [960, 540]);

               }

This topic has been closed for replies.
Correct answer Paul Tuersley

See the LightLayer object's lightType attribute. Page 100 of the AE CS6 scripting guide.

pointLight = activeItem.layers.addLight("Light", [960, 540]);

pointLight.lightType = LightType.POINT;

1 reply

Paul TuersleyCorrect answer
Inspiring
October 6, 2013

See the LightLayer object's lightType attribute. Page 100 of the AE CS6 scripting guide.

pointLight = activeItem.layers.addLight("Light", [960, 540]);

pointLight.lightType = LightType.POINT;

JesB-SsPV8V
Inspiring
October 6, 2013

Thanks alot for quick reply!

I'll gonna try it out