Skip to content

Commit

Permalink
Fix instance light matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
pragma37 committed Jan 2, 2024
1 parent 58b77fb commit f335963
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BlenderMalt/MaltRenderEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def add_object(obj, matrix, id):

light = Scene.Light()
light.color = tuple(obj.data.color * malt_light.strength)
light.position = tuple(obj.matrix_world.translation)
light.direction = tuple(obj.matrix_world.to_quaternion() @ Vector((0.0,0.0,-1.0)))
light.position = tuple(matrix.translation)
light.direction = tuple(matrix.to_quaternion() @ Vector((0.0,0.0,-1.0)))
if malt_light.override_global_settings:
light.sun_max_distance = malt_light.max_distance
light.radius = malt_light.radius
Expand Down

0 comments on commit f335963

Please sign in to comment.