Fix for RNA_int/enum mixup
UI: tooltips, blurry and incorrect rhs-padding in recent update

D634 by Severin
Cycles: Fix crash with environment maps and packed images
Per-material line color settings for Freestyle.

New properties 'line_color' and 'line_priority' are added to Material ID data blocks.

The 'line_color' property allows users to specify a per-material line color that can be
used as a Freestyle line color through Material color modifiers of line style settings.

The new line color property is intended to provide a solution for line color
stylization when a proper Freestyle support for Cycles is implemented (likely
as part of the upcoming Blender 2.72 release; see Patch D632).  Materials in
Cycles are usually set up using shader nodes, and Freestyle won't be capable
of retrieving colors and other properties from node-based materials any soon.

The new line color property of materials addresses this foreseen limitation by
providing artists with an intuitive alternative mean to specify line colors on a
per-material basis independently from node trees.

The 'line_priority' property gives users a way to control line colors at material
boundaries.  When a line is drawn along a feature edge at material boundaries,
one of the two materials on both sides of the edge has to be picked up to
determine the line color.  So far there was no way to control this selection
(which was in effect at random).  Now the material with a higher line color
priority will be selected.

The new per-material line settings are shown in the new Freestyle Line tab in
the Material context of the Properties window (only when Freestyle is enabled).
Fix T40877: Bezier Hook to New Object does not work properly
Follow-up to my last commit: Fixed a wrong property name in the versioning code.
Fix T40712: Duplicators don't generate orco and UV coordinates in Cycles viewport preview.
Fix T39286: Display percentage ignored in Cycles viewport.

The threaded depsgraph update changes included a cleanup of the global
is_rendering flag, which was replaced by a general EvalContext being
passed to dupli functions.

Problem is that the global flag was true for viewport duplis before
(ugly hack), which was used as a check for generating dupli orco/UV from
mesh data layers. The new flag is stricter and only true for actual
renders, which disables these attributes and breaks the Cycles
Texture Coordinates and UVMap nodes.

The solution is to extend the simple for_render boolean to an enum:
* VIEWPORT: OpenGL viewport drawing (dupli tex coords omitted)
* PREVIEW: Viewport preview render (simplified modifiers)
* RENDER: Full render with all details and attributes

There are still some areas that need to be examined, in particular
modifiers seem to totally ignore the EvaluationContext!
Instead they generally execute without render params from the depsgraph
(BKE_object_handle_update_ex) and are built with render settings
explicitly.

Differential Revision: https://developer.blender.org/D613
Fix T40791: Changing path to movie file does not mark the project as changed
Fix T40775: Clearing material texture slot through Python does not update 3D View render
Fix compilation error with Freestyle after recent DAG changes
Code cleanup: Simplify decoupled scattering code a bit.
BGE: Fix for applyImpulse function

This is related to task T29419. Credit also goes to Goran Milovanovic
(goran) for proposing an initial fix for this issue.

The issue is the current behavior of applyImpulse doesn't match the behavior
described in the documentation as instead of a impulse point in world coordinates,
it seems to require a coordinate in a local space.

Additionally, applyImpulse function isn't consistent with similar functions (applyForce, applyTorque, etc)
as it doesn't allow  to choose in which space (local or global) the impulse is applied.

Now, we have the following function:

applyImpulse(point, impulse, local=False)
being "point" the point to apply the impulse to (in world or local coordinates). When local is False will
have both point and impulse in World space and when local is True will have point and impulse in local space.

Reviewers: moguri, dfelinto, brita_

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D567
OSX/cmake: Real fix for T40887, the reason was find_package(OpenMP) silently failing, breaking all other tests following
- tested gcc 4.8.1 works again
- tested clang-omp in libs works again
- i assume atm., if we only use vanilla clang it is the one in darwin libs
BLI_string, dont pass unicode to ascii BLI_str_partition functions
OSX/cmake: more work on T40887 and a tentative fix
- test fail due libiomp5 is not available @ testing time
- must solve this by adding requred flags/includes to tests
- atm release builds are possible with this hack
Install_deps: minor cleanup.

Patch D633 by simonrepp (Simon Repp), thx.
Fix T40986: crash on using the viewer node inside of group nodes.

Viewers were activated both inside the active group as well as the top
level tree (the latter being a quick fix for getting a fallback viewer).
This caused a race condition on the shared viewer image.

Now the active viewer is defined at node conversion time in the converter
so that only one can be active at a time without each node having to
follow complicated rules for exclusion.
Fix T40983 Particle Texture use of generated coordinates is wrong.

Particle texture eval was not taking the actual texture space for orco/
generated textures into account at all.
Fix T40785: "Select Grouped" Pass Index mode is redundant.
Revert "Object Select Similar tool now has a Pass Index option."

This reverts commit 7a6919a74eb08caaf21030c17fe7c2723394a3d6.
OSX/CMAKE: extend my former workaround for failing tests with clang-omp to all build types
- this workaround makes sure the breaking -fopenmp is not exposed to testcompiles which use C_FLAGS respective CXX_Flags
- -fopenmp is always added to the CMAKE_C(XX)_FLAGS_<BUILD_TYPE> now
- another way to solve this would be to move the Configure OpenMP part after all line 2366,
but i don’t know if this would be apreciated