fuckin hell
[carveJwlIkooP6JGAAIwe30JlM.git] / blender_export.py
index 538ed6cdd69168bf32316d683daa90cfbd57deca..06d90a4b11d4cb69654c547958f28e6d134a695d 100644 (file)
@@ -2,7 +2,7 @@
 # =============================================================================
 # 
 # Copyright  .        . .       -----, ,----- ,---.   .---.
-# 2021-2022  |\      /| |           /  |      |    | |    /|
+# 2021-2023  |\      /| |           /  |      |    | |    /|
 #            | \    / | +--        /   +----- +---'  |   / |
 #            |  \  /  | |         /    |      |   \  |  /  |
 #            |   \/   | |        /     |      |    \ | /   |
@@ -771,6 +771,33 @@ class classtype_audio(Structure):
    #}
 #}
 
+# Classtype 200
+# 
+#  Purpose: point light
+#
+class classtype_point_light(Structure):
+#{
+   _pack_ = 1
+   _fields_ = [("colour",c_float*4)]
+
+   def encode_obj(_, node, node_def):
+   #{
+      node.classtype = 200
+
+      data = node_def['obj'].data
+      _.colour[0] = data.color[0]
+      _.colour[1] = data.color[1]
+      _.colour[2] = data.color[2]
+      _.colour[3] = data.energy
+   #}
+
+   @staticmethod
+   def editor_interface( layout, obj ):
+   #{
+      pass
+   #}
+#}
+
 class classtype_spawn_link(Structure):
 #{
    _pack_ = 1
@@ -1816,6 +1843,11 @@ def encoder_process_definition( node_def ):
 
       if obj_type == 'ARMATURE':
          obj_classtype = 'classtype_skeleton'
+      elif obj_type == 'LIGHT':
+      #{
+         if obj.data.type == 'POINT':
+            obj_classtype = 'classtype_point_light'
+      #}
       else:
       #{
          obj_classtype = obj.cv_data.classtype