Update leenkx/blender/lnx/make_world.py

This commit is contained in:
Onek8 2025-05-21 22:29:40 +00:00
parent 538c364f33
commit 8b084156ff

View File

@ -190,6 +190,7 @@ def build_node_tree(world: bpy.types.World, frag: Shader, vert: Shader, con: Sha
world.lnx_envtex_color = [col[0], col[1], col[2], 1.0]
world.lnx_envtex_strength = 1.0
world.world_defs += '_EnvCol'
assets.add_khafile_def("lnx_envcol")
# Clouds enabled
if rpdat.lnx_clouds and world.lnx_use_clouds:
@ -271,6 +272,7 @@ def parse_surface(world: bpy.types.World, node_surface: bpy.types.Node, frag: Sh
# Append irradiance define
if rpdat.lnx_irradiance and not solid_mat:
wrd.world_defs += '_Irr'
assets.add_khafile_def("lnx_irradiance")
# Extract environment strength
# Todo: follow/parse strength input
@ -284,6 +286,7 @@ def parse_surface(world: bpy.types.World, node_surface: bpy.types.Node, frag: Sh
solid_mat = rpdat.lnx_material_model == 'Solid'
if rpdat.lnx_irradiance and not solid_mat:
world.world_defs += '_Irr'
assets.add_khafile_def("lnx_irradiance")
world.lnx_envtex_color = node_surface.inputs[0].default_value
world.lnx_envtex_strength = 1.0