"Gluing" Python property and C property for lamps?


#1

I’ve been trying to implement the angular diameter parameter for the sun lamp as part of the quick hack to learn blender’s code.

As part of this, I’ve managed to implement some of it here where I’ve defined a FloatProperty in python, and managed to get it to show up in the UI, and have also managed to define something similar in C, along with the RNA and DNA structs.
From what I can tell, they don’t seem to affect each other, and I’ve hit a wall in terms of how to proceed.

Mainly:

  • How do I “glue” them together so that updating one updates the other?
  • Is there a way to set getters and setters for C properties like there is in the python code?
  • How do I go about testing this?
  • Once I manage to glue them together, where is the “size”/direction of the sun lamp defined? I can’t find it in light.cpp.