XPlane2Blender
XPlane2Blender copied to clipboard
Does XPlaneLayer.lod and XPlaneLayer.cockpit_region need their initializer code in update?
lod and cockpit_region (bad names) have updaters to prevent the need for operators to add and subtract them (kinda wish we had used this pattern elsewhere)
Why was this necissary in the updater? As far as I can see we don't have code that assumes these act like fixed length arrays.
while len(layer_props.lod) < xplane_constants.MAX_LODS - 1:
layer_props.lod.add()
while len(layer_props.cockpit_region) < xplane_constants.MAX_COCKPIT_REGIONS:
layer_props.cockpit_region.add()
It appears I have an uncommited unit test for those lines of code. 8510aba081d4d66 is where this is finalized. A custom startup was added but not the test that uses it?
Interesting, I made this. No feature or bug to go with this. 9d9909aeb2f86ae7
I decided I didn't like the add lod buttons and would replace it with this updater idea. So the idea was getting rid of a UI element first. Still doesn't answer my question. Pretty sure the answer is no.