Skip to content
This repository was archived by the owner on May 3, 2026. It is now read-only.

Commit 86d9526

Browse files
authored
Merge pull request #13 from Project-Collapse-Studios/psc-dev
add: workaround for the named lights with Static Bounce selected
2 parents 84ee421 + e43b46b commit 86d9526

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
"""A workaround fix for named Baked Bounce lights flagging bounced lighting in lightmap pages."""
2+
3+
from hammeraddons.bsp_transform import trans, Context
4+
from srctools.logger import get_logger
5+
from srctools import Entity, VMF, Output, conv_int
6+
7+
8+
9+
LOGGER = get_logger(__name__)
10+
11+
@trans("workaround_bakedbounce")
12+
def bbounceworkaround(ctx: Context):
13+
vmf: VMF = ctx.vmf
14+
for light in vmf.by_class["light"] | vmf.by_class["light_spot"] | vmf.by_class["light_rt"] | vmf.by_class["light_rt_spot"]:
15+
if light["targetname", ""] and light["_lightmode", 2] == "2":
16+
LOGGER.info(f"Changing light {light["targetname"]}")
17+
light["_lightmode"] = 3
18+
light["style"] = 0
19+
20+

0 commit comments

Comments
 (0)