Cycles: small code cleanup + fix SSS closure mixed with other closures doing
a bit too much work.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55728 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34788, #34744: GLSL error, #version line needs to be at the top of the shader
and this wasn't the case anymore after recent changes.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55729 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34711: matcap option not showing when switching from cycles material/rendered
draw mode to blender internal.

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

Sequencer histogram was calculating still badly, now it uses a per-color
component counter to calculate the levels (instead of counter for all)




git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55731 954f8c5b-7b00-dc11-b283-0030488c597c
Fixes for recent GLSL display space conversions

- Building without OCIO will give correct results again
- If GLSL failed to compile, fallback to glaDrawPixelsAuto
  will happen.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55732 954f8c5b-7b00-dc11-b283-0030488c597c
More usage of GLSL for color managed image drawing

Uses GLSL for drawing image in Image Editor space.

This requires change in image_buffer_rect_update, so
original float buffer is being updated as well. This
is unlikely be something bad, but will keep an eye
on this change.

Also no byte buffer allocation happens there, this
is so because byte buffer used for display only
and in case of GLSL display such allocation and
partial update is just waste of time.

Also switched OpenGL render from using CPU color
space linearization to GLSL color space transform.
Makes OpenGL rendering pretty much faster (but
still slower than in 2.60).

internal changes:

- Added functions to setup GLSL shader for color
  space conversion in colormanagement.c. Currently
  conversion form a colorspace defined by a role to
  linear space is implemented. Easy to extend to
  other cases.

- Added helper functions to glutil.c which does
  smarter image buffer draw (calling all needed OCIO
  stuff, editors now could draw image buffer with a
  single function call -- all the checks are done in
  glutil.c).

- Also added helper function for buffer linearization
  from a given role to glutil.c. Everyone now able to
  linearize buffer with a single call.

  This function will do nothing is GLSL routines fails
  or not supported.

  And one last this: this function uses offscreen
  drawing, could potentially give issues on some
  cards, also will keep an eye on this.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55733 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for potential missing draw-update when building without OCIO

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55734 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34803: blender internal SSS rendering black/nan with negative texture colors.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55735 954f8c5b-7b00-dc11-b283-0030488c597c
Box and Ellipse mask nodes will now output shape
even if nothing is attached to input.

They'll use black image with render resolution
as a background if nothing is attached to mask input.

Was a request from 4K ToS project.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55736 954f8c5b-7b00-dc11-b283-0030488c597c
Tweak allocation vars for linear space so black is converted
to black when using GLSL display transform.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55737 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34849: crash in operator search menu, due to brush stencil poll
function not checking NULL pointer.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55738 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34759: cycles texture influence for particles not shown correct when switching
to a different texture slot.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55739 954f8c5b-7b00-dc11-b283-0030488c597c
Fix incorrect OS X warning message in console when using multisample antialiasing
about number of samples not matching the requested number.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55740 954f8c5b-7b00-dc11-b283-0030488c597c
remove workaround for [#34346], checked on applying this workaround for armatures too but it happens in more cases then I originally thought.
for now users of opensource Nouveau and ATI drivers can't use multiple windows, the bug needs to be fixed in the driver.


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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55743 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#34847] Box selecting shape keys of a mask causes crash


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55744 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#34850] "x" to clear ID prop fields is too close to the right border


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55745 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#34825] Transparent background of Empty Images clips objects behind them away when Empty is not selected

allow 'Transparency' option to be used on empty-images.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55746 954f8c5b-7b00-dc11-b283-0030488c597c
use floats for transform snapping distance comparisons


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

 * deduplicated a bunch of code and moved it into outliner_dropzone_find()
 * moved all the per-dropzone checks into the poll functions
 * one functional change, disable drop parenting on self & self->parent

The basic assumption: if poll() == true then outliner_dropzone_find() will return a valid TreeElement


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