This commit is contained in:
2026-06-24 20:23:12 -07:00
parent 6b704ff469
commit 37c8779d12
10 changed files with 512 additions and 399 deletions

View File

@ -2198,25 +2198,28 @@ class LeenkxExporter:
light_object = light_objects[0] if len(light_objects) > 0 else None
objtype = light_ref.type
color = [light_ref.color[0], light_ref.color[1], light_ref.color[2]]
if light_ref.use_temperature:
temperature_color = light_ref.temperature_color
color[0] *= temperature_color[0]
color[1] *= temperature_color[1]
color[2] *= temperature_color[2]
if bpy.app.version >= (4, 5, 0):
if light_ref.use_temperature:
temperature_color = light_ref.temperature_color
color[0] *= temperature_color[0]
color[1] *= temperature_color[1]
color[2] *= temperature_color[2]
strength = light_ref.energy * math.pow(2.0, light_ref.exposure)
if not light_ref.normalize:
area = 0.0
try:
if light_object is not None:
area = light_ref.area(matrix_world=light_object.matrix_world)
else:
strength = light_ref.energy * math.pow(2.0, light_ref.exposure)
if not light_ref.normalize:
area = 0.0
try:
if light_object is not None:
area = light_ref.area(matrix_world=light_object.matrix_world)
else:
area = light_ref.area()
except TypeError:
area = light_ref.area()
except TypeError:
area = light_ref.area()
if area > 0.0:
strength *= area
if area > 0.0:
strength *= area
else:
strength = light_ref.energy
out_light = {
'name': object_ref[1]["structName"],