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,7 +69,12 @@ def process_entity(ent):
|
||||||
name = classname
|
name = classname
|
||||||
if "classname" in ent.d and ent.d["classname"][:5] == "light":
|
if "classname" in ent.d and ent.d["classname"][:5] == "light":
|
||||||
light = bpy.data.lamps.new("light", 'POINT')
|
light = bpy.data.lamps.new("light", 'POINT')
|
||||||
light.distance = 300.0
|
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'
|
light.falloff_type = 'CUSTOM_CURVE'
|
||||||
obj = bpy.data.objects.new(name, light)
|
obj = bpy.data.objects.new(name, light)
|
||||||
obj.location = parse_vector (ent.d["origin"])
|
obj.location = parse_vector (ent.d["origin"])
|
||||||
|
|
Loading…
Reference in a new issue