X-Plane / XPlane2Blender

Scenery & Aircraft export addon for Blender and X-Plane
GNU General Public License v3.0
197 stars 67 forks source link

Clean "TODO"s out of the code base! #319

Open tngreene opened 6 years ago

tngreene commented 6 years ago

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!

tngreene commented 6 years ago

xplane_bone.py:

xplane_light.py

xplane_helpers.py

Delete floatToStr because it is slow and terrible. See #347 for where it was fixed.

tngreene commented 6 years ago
tngreene commented 5 years ago

c97a96411ee448cf1 - Renamed the terribly named "getWeight" method.

tngreene commented 5 years ago

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!