Woot woot commit.

Stencil style texture mapping. Ready for field testing and user feedback.

This commit adds stencil like brushes, like those that existed on old ptex branch.
(with the exception of clip colour)
To control the position of the stencil, you use

Q: translation
Shift - Q: scaling
Ctrl - Q: rotation

There's extra work that has been done to make this work:

* Support for coloured overlay in vertex/texture painting
* Also made A button do stroke mode selection like in sculpt mode,
when mask painting is inactive.

There are some TODOs to work on during bcon3:

* Support tiled and stencil mode in 2D painting. Support alpha textures also.
* Tidy up overlay code. There's some confusion there due
to the way we use the primary brush texture sometimes for alpha, other times
for colour control.

WIP design docs will be in

http://wiki.blender.org/index.php/User:Psy-Fi/New_Brush_Tool_Design

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55679 954f8c5b-7b00-dc11-b283-0030488c597c
Cycles / Shader Graph optimization:
* Unnecessary shader inputs inside the Mix Shader are now ignored, in case the factor is 0.0 / 1.0 and not connected. 
This way we save some render time for complex node graphs. 

Example: http://www.pasteall.org/pic/show.php?id=48226
Check the Mix Shader at the end: In this case, Cycles will now avoid the complete huge shader tree, and only calculate the Diffuse Shader.
Rendertime decreased from 1:50 min to 1:20 min on CPU. GPU rendering benefits as well from this. 

This only affects SVM, OSL was already doing these optimizations. 

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


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

* Using masking is determined only by the presence of the texture,
remove extraneous DNA flag (might cause issues later but in practice
brush options are not harmful)
* Overlay and angle sliders are active during stencil mapped brushes
* Only draw the overlay if there's a texture.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55684 954f8c5b-7b00-dc11-b283-0030488c597c
optimize away reloading of brush texture when rotating the stencil

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55685 954f8c5b-7b00-dc11-b283-0030488c597c
Changes to Stencil control:

* Add a poll function that only activates the operator when a stencil
brush is active
* Change shortcuts to RMouse - translate, Shift - RMouse Scale, Ctrl -
RMouse, rotate. MUCH faster and simpler workflow.
* Change shortcut of colour sampling to S. Sampling is important but not
as important as warranting the Right Mouse button.
* Add a notifier so that toolbar gets updated texture rotation when
rotating the stencil

Also,
* Slight rearrangement of options so that jittering is more accessible
(easily more often used than smooth stroke)

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55686 954f8c5b-7b00-dc11-b283-0030488c597c
Fix typo in recent i18n changes

Broke rigid body buttons in physics tab.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55687 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for [#34821] Split Viewer node won't show the backdrop
* Regression introduced in r55451

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55688 954f8c5b-7b00-dc11-b283-0030488c597c
Draw relationship lines for rigid body constraints

Makes it easier to see what's connected to what.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55689 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34819: Background image gets pixelated when zooming in

Was a regression in glaDrawPixelsTex changes related on zoom filter.
For background image linear interpolation was used.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55690 954f8c5b-7b00-dc11-b283-0030488c597c
correct too-big allocation in mesh beautify.


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