From d04874e0b358f37c4d86e3a0e32faa8321fc2f8a Mon Sep 17 00:00:00 2001 From: Onek8 Date: Tue, 10 Jun 2025 18:55:35 +0000 Subject: [PATCH] t3du - Set / Get World Nodes --- leenkx/blender/lnx/make_world.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/leenkx/blender/lnx/make_world.py b/leenkx/blender/lnx/make_world.py index 001624b..1ac33d4 100644 --- a/leenkx/blender/lnx/make_world.py +++ b/leenkx/blender/lnx/make_world.py @@ -47,11 +47,20 @@ def build(): with write_probes.setup_envmap_render(): - for scene in bpy.data.scenes: - world = scene.world + #for scene in bpy.data.scenes: + for world in bpy.data.worlds: + #world = scene.world - # Only export worlds from enabled scenes and only once per world - if scene.lnx_export and world is not None and world not in worlds: + assigned = False; + for scene in bpy.data.scenes: + if scene.lnx_export and scene.world is not None: + if scene.world.name == world.name: + assigned = True; + break; + + #if scene.lnx_export and world is not None and world not in worlds: + # Only export worlds from enabled scenes and with fake users + if (world.use_fake_user and world.name != 'Lnx') or assigned: worlds.append(world) world.lnx_envtex_name = ''