XPlane2Blender
XPlane2Blender copied to clipboard
280: Updater rename feature doesn't cover if scene has no "layers" pre alpha.6
This whole feature was developed under the impression that "layers" would exist and we'd make decisions based on if it was an array of 20 things or not. Forgot about the case where "layers" itself might not exist, therefore not get renamed or have its visibility or have is_exportable_collection
.
This is unfortunate, and the only reason I care is that something named "Collection 1.001" could be victem of this bug or it could also be an indication something went wrong with the update before the renaming could be complete. We won't know. Fortunately I think files without "layers" at all are probably rare. I hope.
The fix is probably simple:
xplane_updater.py, copy or reuse lines 78-80 if "layers" is empty or non-existant. I just can't justify the time to add to the unit test on this. We'll see what files from the wild show.