Cycles Hair: Strand Minimum Pixel Size

Code is added to restrict the pixel size of strands in cycles. It works best with ribbon primitives and a preset for these is included. It uses distance dependent expansion of the strands and then stochastic strand removal to give a fading. To prevent a slowdown for triangle mesh objects in the BVH an extra visibility flag has been added. It is also only applied for camera rays.

The strand width settings are also changed, so that the particle size is not included in the width calculation. Instead there is a separate particle system parameter for width scaling.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56072 954f8c5b-7b00-dc11-b283-0030488c597c
Random number generator: replace a bunch of usage of the global random number
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.

Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56073 954f8c5b-7b00-dc11-b283-0030488c597c
Fix a few warnings. One was an actual bug in freestyle where stroke attributes
were not properly interpolated.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56074 954f8c5b-7b00-dc11-b283-0030488c597c
Fix crash rendering environment maps.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56075 954f8c5b-7b00-dc11-b283-0030488c597c
Fix crash rendering environment maps. I think this freestyle code was not
intended to be here and probably was left over from some earlier code, as
resetting the configuration on render would lead to data loss.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56076 954f8c5b-7b00-dc11-b283-0030488c597c
Compile fixes for recent commits

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56077 954f8c5b-7b00-dc11-b283-0030488c597c
update uncrustify config, use floats for FloatProperty() min/max


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56078 954f8c5b-7b00-dc11-b283-0030488c597c
move editmesh_bvh.c into blenkernel.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56079 954f8c5b-7b00-dc11-b283-0030488c597c
move editmesh functions out editderivedmesh.c into editmesh.c


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56080 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: use BKE naming conventions for functions in BKE_editmesh.h and BKE_editmesh_bvh.h


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56081 954f8c5b-7b00-dc11-b283-0030488c597c
missed moving BKE_editmesh_from_object in previous commit.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56082 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for line instability with the Polygonization geometry modifier.
Extra long straight lines showed up randomly due to the use of an uninitialized
variable as a line length parameter.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56083 954f8c5b-7b00-dc11-b283-0030488c597c
use psys->seed for smoke random number generator, increase size of MATHUTILS_TOT_CB and reduce float->double conversions.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56084 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34897: Select edge loop shortcut not working in Maya preset

Made it so loop/ring selection are assigned to RELEASE button,
so they're not conflicting with regular selection.

There's still seems to be a conflict between loop and ring
selection, but it was here for ages and that's another story.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56085 954f8c5b-7b00-dc11-b283-0030488c597c
Fixed compilation error with gcc 4.4 and 4.5

Was giving structure re-declaration error,
made it one typedef and struct declaration only.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56086 954f8c5b-7b00-dc11-b283-0030488c597c
skip calling BKE_editmesh_tessface_calc() from BKE_bmbvh_new(), also quiet float/double warnings.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56087 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34966: cycles packed PNG images were showing alpha fringe, packed images
were not properly premultiplied.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56088 954f8c5b-7b00-dc11-b283-0030488c597c
Fix crash when no brush is active. Reported by Francesco Siddi, on irc
thanks!

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56089 954f8c5b-7b00-dc11-b283-0030488c597c
bmesh speedup for bvh building, replace SmallHash with BLI_bitmap, using a hash doesn't make much sense since in most cases all vertices are accessed and the hash isn't guaranteed to be small.
gives ~9x speedup to filling 'cagecos' in my own tests on a high poly mesh.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56090 954f8c5b-7b00-dc11-b283-0030488c597c
Option to hide overlay during a stroke. To enable, press the brush icon
next to the overlay alpha.

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