mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Un-hardcode the light distance.
This commit is contained in:
parent
dfaf28001a
commit
125952d17d
1 changed files with 6 additions and 1 deletions
|
@ -69,6 +69,11 @@ def process_entity(ent):
|
|||
name = classname
|
||||
if "classname" in ent.d and ent.d["classname"][:5] == "light":
|
||||
light = bpy.data.lamps.new("light", 'POINT')
|
||||
if "light" in ent.d:
|
||||
light.distance = float(ent.d["light"])
|
||||
elif "_light" in ent.d:
|
||||
light.distance = float(ent.d["_light"])
|
||||
else:
|
||||
light.distance = 300.0
|
||||
light.falloff_type = 'CUSTOM_CURVE'
|
||||
obj = bpy.data.objects.new(name, light)
|
||||
|
|
Loading…
Reference in a new issue