Cleanup: Remove unused function in Translucent BSDF.
Cleanup: Style fixes for closures, mainly bitflags and conditions.
Revert "Fix T42222"

This reverts commit 507712db3fd7aa7bb903f6860f5a4eb29aa2be02.

Error was quite an old compiler, which had further warnings/errors.

Old compilers can just have this defined in BLI_math
Cycles: Add a soft min/max UI value for volume step size, usually a range from 0.01 to 1.0 is fine.
Cycles: Optimize math node without links to a single value node

Pretty straightforward implementation. Just needed to move some functions
around to make them available at shader compile time.
Fix T42389: Removed outdated comment from custom_nodes.py example script.

There was some confusion about the bl_icon attribute being optional. In
fact the functionality for hiding a tree type in the editor header is
now controlled by writing a poll function for the tree type instead,
which is more flexible and clean.

http://www.blender.org/documentation/blender_python_api_2_71_6/bpy.types.NodeTree.html#bpy.types.NodeTree.poll
Fix T42394: Copy Rigid Body Tools would not work as expected if dest ob had no rigidbody yet.

Adding new object to RigidBodyWorld obgroup is not a good way to do that, since it only
takes effect (create rigid_body for new objects) when you change current frame.

Better to use rigidbody.object_add() operator here!
Fix for Ctrl+Del/Backspace not setting text dirty
Cleanup: warnings, typos
Fix T42294: Bullet rigidbody point cache reading was using uninitialized
key values for velocity.
Correct stub
Fix T42395: Stored "render data" in particles mismatches the particle
amount and crashes after Cycles render.

This is a hack to fix this, but at this point the system is hopelessly
broken anyway and no good fix other than total rewriting is possible.
UI: let multi-num-drag change different ID values

Handy for property-chart addon.
UI: Fix tooltip text color not resetting correctly

The "Reset to Default Theme" operator didn't reset the tooltip text color correctly.
Fix T42441: Smoke doesn't render in 3DView if domain object's maximum draw type is set to "wire"

Added an exception in convertblender.c's is_object_hidden(), so that an object with active
smoke modifier is never considered hidden.
Fix T42444: Neg scale rotated object flips 2x axis

This is a very old bug and a few attempts have been made to fix it before,
Old code was checking worldspace axis flipping, instead of axis flipping WRT the axis-alignment of the object.
Deduplicate some code by using a function pointer to the real kernel
This has no performance impact what so ever and is already used in the adaptive sampling patch
Fix negate_m3 (taking 4x4 matrix)

Cycles bake used incorrectly.
Fix for mat3_to_rot_size modifying input matrix
Cycles / OSL: Support microfacet() closure color function from OSL 1.5

This is basically just a wrapper class, which maps the generic call from the OSL spec to our closures.

Example usage:

shader microfacet_osl(
    color Color = color(0.8),
    int Distribution = 0,
    normal Normal = N,
    vector Tangent = normalize(dPdu),
    float RoughnessU = 0.0,
    float RoughnessV = 0.0,
    float IOR = 1.4,
    int Refract = 0,
    output closure color BSDF = 0)
{
    if (Distribution == 0)
        BSDF = Color * microfacet("ggx", Normal, Tangent, RoughnessU, RoughnessV, IOR, Refract);
    else
        BSDF = Color * microfacet("beckmann", Normal, Tangent, RoughnessU, RoughnessV, IOR, Refract);
}