grid based
[carveJwlIkooP6JGAAIwe30JlM.git] / blender_export.py
index 6117ff871b80bbd0ead49466cec553776ac0176b..a12850b2b347f02b0391166b8cb90ed191716083 100644 (file)
@@ -814,7 +814,8 @@ class classtype_world_light( Structure ):
    _pack_ = 1
    _fields_ = [("type",c_uint32),
                ("colour",c_float*4),
-               ("angle",c_float)]
+               ("angle",c_float),
+               ("range",c_float)]
 
    def encode_obj(_, node, node_def):
    #{
@@ -826,6 +827,9 @@ class classtype_world_light( Structure ):
       _.colour[1] = data.color[1]
       _.colour[2] = data.color[2]
       _.colour[3] = data.energy
+      _.range = data.cutoff_distance # this has to be manually set
+                                     # TODO: At some point, automate a min
+                                     #       threshold value
 
       if obj.data.type == 'POINT':
       #{
@@ -835,7 +839,7 @@ class classtype_world_light( Structure ):
       elif obj.data.type == 'SPOT':
       #{
          _.type = 1
-         _.angle = math.cos(data.spot_size*0.5)
+         _.angle = data.spot_size*0.5
       #}
 
       if data.cv_data.bp0: