Consolidate and update

This commit is contained in:
2026-10-27 15:58:22 -07:00
parent eb211da457
commit 6c13722fc6
42 changed files with 498 additions and 169 deletions

View File

@ -2724,6 +2724,8 @@ class LeenkxExporter:
self.extract_projection(o, proj)
else:
self.extract_ortho(o, proj)
if par_x == par_y:
o.pop('aspect', None)
o['frustum_culling'] = objref.lnx_frustum_culling
o['clear_color'] = self.get_camera_clear_color()
@ -3124,19 +3126,20 @@ class LeenkxExporter:
def export_world(self):
"""Exports the world of the current scene."""
for world in bpy.data.worlds:
if world is not None:
world_name = lnx.utils.safestr(lnx.utils.asset_name(world) if world.library else world.name)
world = self.scene.world
if world_name not in self.world_array:
self.world_array.append(world_name)
out_world = {'name': world_name}
if world is not None:
world_name = lnx.utils.safestr(lnx.utils.asset_name(world) if world.library else world.name)
self.post_export_world(world, out_world)
self.output['world_datas'].append(out_world)
if world_name not in self.world_array:
self.world_array.append(world_name)
out_world = {'name': world_name}
elif lnx.utils.get_rp().rp_background == 'World':
log.warn(f'Scene "{self.scene.name}" is missing a world, some render targets will not be cleared')
self.post_export_world(world, out_world)
self.output['world_datas'].append(out_world)
elif lnx.utils.get_rp().rp_background == 'World':
log.warn(f'Scene "{self.scene.name}" is missing a world, some render targets will not be cleared')
def export_objects(self, scene):
"""Exports all supported blender objects.
@ -3397,7 +3400,8 @@ class LeenkxExporter:
else:
self.extract_ortho(out_camera, proj)
out_camera['aspect'] = effective_aspect
if par_x != par_y:
out_camera['aspect'] = effective_aspect
self.output['camera_datas'].append(out_camera)