Aiming lights
Richard Penney
Posts: 41
Does anybody know if you can aim (point) a Spotlight in Daz Script in a similar fashion as aiming a camera? I've examined the DzSpotlight API but can't see anything.
Post edited by Richard Penney on
Comments
DzLight inherits DzCamera, so all the methods from the base camera object are available to lights (unless overridden).
Thanks a million, Richard. It had crossed my mind why DzLight was derived from DzCamera. Now I know!
Here's a starter kit: https://www.daz3d.com/forums/discussion/85971/a-script-to-orbit-camera-around-a-point
Example usage:
Thanks a lot, Praxis. I'll begin looking at this code tomorrow. It could be a cool extension to the product I've been developing!
Richard gave me a good heads-up on the relationship between DzSpotLight and DzCamera. It helped me a lot. But I'm still not able to programatically set a spotlight's intensity. Any ideas?
Have you tried using one of the findProperty methods?
1) Create a Light, and select it.
2) In the Script IDE Pane, enter and execute this:
3) Copy & paste the output into your text editor, and search for "Intensity". You will find getIntensityControl()
4) Change the code to this, and execute it:
The best general answer to Scripting questions like this may be:
Hey guys. Thanks for the pointers.
Before I read your comment, Praxis, I was playing around with the object.findProperty() method, and got the following code to set a light's intensity.
Goes to show that there can be more than one way to accomplish things in Daz Scripting.
And thanks for sharing the link to the post by Rob.