XPlane2Blender
XPlane2Blender copied to clipboard
Clean "TODO"s out of the code base!
There are a bunch of TODOs in the code base saying things like "TODO: Is this needed"? "TODO: Remove me?" "TODO: [Something that got fixed]" and commented out code.
Not only is it sloppy, it is also confusing, to understand the state of the code. If there is a "TODO: Fix me" it should have a bug filed with it!
xplane_bone.py:
- Sometimes uses a hard-coded 5
xplane_light.py
- Rounds axis_angle_theta in autodetection_algorithm to a hardcoded 5 digits
xplane_helpers.py
- in floatToStr, FLOAT_PRECISION = 8 is used to round numbers
Delete floatToStr because it is slow and terrible. See #347 for where it was fixed.
- 4252dadf8 - xplane_config.debug/log removed
- 28fb74cde (and later b68193) - Remove XPLANE_OBJECT_TYPE_* constants
- Other dumb TODO comments removed in this time region
c97a96411ee448cf1 - Renamed the terribly named "getWeight" method.
Annoying uses of hasattr are not uncommon. For instance
if hasattr(mesh, 'calc_normals_split'): # split normals
mesh.calc_normals_split()
supports_split_normals = True
if hasattr(mesh, 'polygons'): # BMesh
mesh.update(calc_tessface = True)
mesh.calc_tessface()
mesh_faces = mesh.tessfaces
else:
mesh_faces = mesh.faces
We're far in future already! Yes we have this stuff!