Code cleanup: use BKE_BIT_TEST_SET to set flags
WM: expose file loading operator property init functions
Add load_ui to WM_OT_read_homefile

Useful for implementing templates.

Patch D423 by Gaia Clary
Forgotten to add this on last commit. This would cause dyntopo to always
refresh all its nodes if show diffuse was on.
Freestyle: Fix for debug information about sweep line intersection detection.

Vertices of two edges were swapped by mistake.  Also fixed indentation and added
a couple of debug prints to make it easier to visualize the lines using Matlab.
Code cleanup: strict flags for bmesh_log
Fix T39245: Crash when dynamic topology is enabled

Redundant decrement was crashing for systems which didnt optimize it out.
Fix build for BSD (broken by own 35747ee3d547).

Reported by Shane Ambler, thanks!
Fix T39567: simple deform modifier error
Fix for T39537 wasn't complete, buttons in popups remained unset.
Optimize BLI_convexhull_aabb_fit_hull_2d, avoid atan2, sin, cos

add utility functions for using a 2d unit vector as a rotation matrix
mul_v2_v2_cw & mul_v2_v2_ccw
Fix T37509: regression in smart-uv island orientation
Slide mask spline segment to define it's curvature

This actually implements the idea used in Gimp which is grabbing
an arbitrary point on the spline and dragging it, ensuring spline
goes over this point. This is really useful way to tweak spline
curvature.

Currently only affects on a closest handle, meaning no weighting
on changes for both handles which are adjacent to the same segment
will happen just yet,

Another limitation is that currently such a slide is a big jumpy
when you start sliding. This is because projection is not used
to calculate u value because projection used to fail a lot for
me here and didn't find a nice solution for this yet. But this is
to be improved for sure!
Fix T39577: cycles issue mixing anisotropic BSDFs with branched path tracer.
Cycles: avoid 1.0f/(1.0f/x) divisions, which msvc (only) can't optimize.

This makes bmw scene in msvc 12 builds 6% faster.
It also gives a minor speedup for SSE hair in all compilers.
I18N: add missing lines

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D328
Cycles: SSE optimization for Voronoi cells texture

Gives 5-6% speedup for Caterpillar_PatazStudio.blend.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D419
Cycles volume: detect homogeneous volume automatically in common cases.

In practice this means that if you don't connect a texture to your volume nodes
it will figure that out and render the node faster, rather than you having to
specify it manually.

Main weakness is custom OSL nodes where we have to assume it is heterogeneous
because we don't know what kind of data the node accesses.
Cycles: Disable Branched Path on all GPUs for now, until we separate the cubins.

SM_20 fails now as well, reported by Zanqdo in IRC.
Clicking outside menus wasn't closing when opened from non menu popups