Levels of detail can be added and modified in the object panel. The object panel also contains new tools for generating levels of detail, setting up levels of detail based on object names (useful for importing), and clearing an object's level of detail settings. This is meant as a game engine feature, though the level of details settings can be previewed in the viewport.
Thanks, can't remember exactly, maybe I was waiting for the expand_doit stuff, but that seems to have been solved now. I think that if this starts to get used for games you will want a "hysteresis threshold" but it shouldn't block this getting committed.
Couldn't find more issues looking over the code and doing some quick tests.
Unused variable, gives a warning here.