Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2019-09-06 07:20:35 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-09-06 07:21:07 +0300
commitc49ac6dee0e7f8ae81798be3c98d73ea7602ae95 (patch)
treed521c7722aa29709d780aad3707e0d6adc094f9e /io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py
parent6e5c6fc94b0305330886e6f3d80dddf4201c888a (diff)
glTF exporter: export custom light ranges
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py')
-rw-r--r--io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py
index 5585d1b0..c87318d0 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_lights.py
@@ -98,8 +98,8 @@ def __gather_type(blender_lamp, _) -> str:
def __gather_range(blender_lamp, export_settings) -> Optional[float]:
- # TODO: calculate range from
- # https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual#range-property
+ if blender_lamp.use_custom_distance:
+ return blender_lamp.cutoff_distance
return None