This patch makes it possible to create custom render engines with native render capabilities (e.g. shader nodetree support).
Some refactoring and Python API expansions were made to enable BI and BGE capabilities accessible through Python.
Also it reduces the usage of conditional expressions with engine names (RE_engine_id_BLENDER_RENDER etc.) by using the bit flags instead, which makes the expressions more generic.
This feature is very important for Blend4Web custom render engine implementation (which needs Blender's shader node tree and other features). It also can be useful for other custom render engines.
There is more simple alternative for native nodetree only in D1188.
Alexander (Blend4Web Team)