Cycles:
* Fix OSL compilation for scene_intersect(), when __Hair__ was disabled. 

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56904 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for [#35245] Freestyle getting stuck on view map creation + memory leaks.

There were two issues:

- Line visibility computations are very slow in the case of the provided .blend file, which gave
an impression that the rendering process got stuck.  The slowness can be explained by the present
data structures used for the line visibility computations, together with the specific mesh distribution
of the test scene.  At the moment Freestyle uses a regular grid in the 2D image coordinate system
to divide tris/quads into small groups in order to accelerate the line visibility computations.
On the other hand, the test scene is populated a big plane (made of one quad) and a moderately
detailed mesh object (22K tris).  The scale of the latter mesh is animated from nearly zero to
about 0.2 to make the object show up over time.  When the scale is nearly equal to zero, all the
tris concentrate in one grid cell, so essentially there is no performance gain from the grid data
structure optimized for speed.  It looks like a better grid data structure (possibly based on
adaptive grid refinement) is necessary to genuinely address the identified performance issue.  For now
the progress bar of Blender is employed to better inform users of the amount of work done in the line
visibility computations.

- A crash was caused by an excessive memory allocation request.  The X and Y dimensions of the grid
data structure are determined based on the average area of mesh faces in the given scene.  When the big
plane in the test scene is excluded from the rendering, the average area is almost zero (on the order
of 1e-5).  As a result of this extremely small average area, the X and Y dimensions were set to a very
large number, causing a fatal memory allocation error.  The present revision has introduced a hard
upper limit to the dimensions of the grid data structure to avoid this kind of numerical instability.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56905 954f8c5b-7b00-dc11-b283-0030488c597c
BGE: Applying patch [#35416] "Missing python properties on ActionActuator: layer, layerWeight" from Florian Bantner (scheintodx).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56906 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35407: different particle behavior compared to 2.66, reverted part of 56073.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56907 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for last fix, compile error in smoke code.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56908 954f8c5b-7b00-dc11-b283-0030488c597c
fix for mistake in r56903


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56910 954f8c5b-7b00-dc11-b283-0030488c597c
fix memory corruption: allocated memory space did not match the needed space

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56911 954f8c5b-7b00-dc11-b283-0030488c597c
revert (ifdef) r54745. which enbabled alpha in the GL buffer.
looks to be the cause of bug [#35415]

we can make this optional.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56912 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: simplify fast_ray_nearest_hit()


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56915 954f8c5b-7b00-dc11-b283-0030488c597c
style cleanup


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56916 954f8c5b-7b00-dc11-b283-0030488c597c
remove WITH_AVX_CPU, also used add_definitions incorrectly.
single cflags can be added manually and don't need their own options.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56917 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: uv_find_nearest_vert
was doing unneeded lookups on face uv's when the adjacent uv's are known.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56918 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: remove some kludge from uv loop select


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56919 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: bmesh/uv
- uv_mouse_select() move from BLI_array to alloca
- was unnecessarily looping over faces for an index lookup when an array is already created.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56920 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: remove unneeded elements in uv NearestHit.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56921 954f8c5b-7b00-dc11-b283-0030488c597c