OSX/CLEW: silence hundreds of warnings: 'weak_import' attribute only applies to variables and functions
Fix T42372: demo addon in doc was not handling keymaps correctly during (un)registration.

First, you should unregister in reverse order you registered your operators, keymaps, etc.
Second, when registering keymaps you have to check keyconfigs are actually available (they are not in background mode).
Fix T42393 crash in texture paint sampling in image mode when mesh did
not have a material
Fix assert's, remove uiEndBlock calls
Add Theme Option for UI Emboss

This adds a theme option for the embossing of UI widgets. By doing this users have much greater flexibility for creating nice themes. Previously many themes (particularly dark ones) looked quite bad due to the very obvious emboss. This made simpler, flat-style themes very challenging.

Closes T42228

Reviewed by @campbellbarton
BMesh Py API: Fast index lookups for vert/edge/faces

This changes the Py API to use array lookup table.
Previously this could be very slow since it would loop over all elements.

Now the python script is responsible for creating the internal lookup table (as with C code).

This will break some scripts.
Remove redundant BLI_exists call
Cleanup: de-duplicate engine-id's
Keymap: PKey only runs BGE when engine is set
WM: unneeded alloc the operator-type iterator
WM: clear operator memory on file load

Was causing problems when opening scenes with different scale set.
Lattice: add-object radius should never scale data

own error, lattice assumes rest state is unscaled data,
scaling needs to be done in object mode.
Fix T41041: 'Delete keyframe' removes markers too

Operators that trigger UI events (but nothing else)
were using 'CANCELLED' making it impossible to tell if an invoke
function failed, or opened a menu.
Cleanup: use SELECT flag
Cleanup: remove redundant 'object' parent class
Markers: show the area that handles marker events
Cleanup: rename draw_markers_time -> ED_markers_draw
Markers: optimize drawing

- avoid 2x glScalef per marker
- skip markers outside the view
- merge drawing into a single loop
OSX/GHOST: fix T42305, appswitching not reliable, proposed by Fabio Arnold
Player: fix conflicting type introduced in 2f0bdcb306999