Skip to main content
Tweeted twitter.com/StackBlender/status/785138758752595968
edited title
Source Link
uhoh
  • 2.7k
  • 2
  • 29
  • 57

Point How to point a sun lamp using a normalized vector programaticallyin Python?

It seems this should be easy - I have a long list of normals as a list of tuples in my python script.

[(nx, ny, nz), (nx, ny, nz), (nx, ny, nz)...]

Each tuple represents the direction I want a sun lamp to point for that particular frame of animation.

How do I set and keyframe the direction of a sun lamp using normala vector?

Is there a straightforward python method - maybe in mathutils - that would set sun lamp's matrix so that it points in the direction of athe vector? I've

I've looked there but nothing stands out as far as I can see, though I'm a mathutils noob.

No nodes or plugins, thanks!

Point a sun lamp using a normalized vector programatically

I have a long list of normals as a list of tuples in my python script.

[(nx, ny, nz), (nx, ny, nz), (nx, ny, nz)...]

Each tuple represents the direction I want a sun lamp to point for that particular frame of animation.

How do I set and keyframe the direction of a sun lamp using normal?

Is there a straightforward python method - maybe in mathutils - that would set sun lamp's matrix so that it points in the direction of a vector? I've looked there but nothing stands out as far as I can see, though I'm a mathutils noob.

No nodes or plugins, thanks!

How to point a sun lamp using a vector in Python?

It seems this should be easy - I have a long list of normals as a list of tuples in my python script.

[(nx, ny, nz), (nx, ny, nz), (nx, ny, nz)...]

Each tuple represents the direction I want a sun lamp to point for that particular frame of animation.

How do I set the direction of a sun lamp using a vector?

Is there a straightforward python method - maybe in mathutils - that would set sun lamp's matrix so that it points in the direction of the vector?

I've looked there but nothing stands out as far as I can see, though I'm a mathutils noob.

No nodes or plugins, thanks!

Source Link
uhoh
  • 2.7k
  • 2
  • 29
  • 57

Point a sun lamp using a normalized vector programatically

I have a long list of normals as a list of tuples in my python script.

[(nx, ny, nz), (nx, ny, nz), (nx, ny, nz)...]

Each tuple represents the direction I want a sun lamp to point for that particular frame of animation.

How do I set and keyframe the direction of a sun lamp using normal?

Is there a straightforward python method - maybe in mathutils - that would set sun lamp's matrix so that it points in the direction of a vector? I've looked there but nothing stands out as far as I can see, though I'm a mathutils noob.

No nodes or plugins, thanks!