Fix #33877: Pressure Sensitivity stop after opening User Preferences Window

Issue was caused by opening the same device id twice and closing one of
descriptors on closing window. This used to close device used by other
windows.

Now moved all device-specific code to SystemX11, so opening and closing
happens only once.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53842 954f8c5b-7b00-dc11-b283-0030488c597c
Unification of brush code

* rename sculpt_brush_texture_settings to brush_texture_settings
* Expose texture scale and offset in texture paint mode
* Introduce still inactive mapping mode for texture paint, tiled and
view aligned only. Projective paint uses only tiled, while 2d paint can
use both. Commit will come that will use both appropriately for both
modes, omitting fixed brush flag (which is tiled with another name)

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53843 954f8c5b-7b00-dc11-b283-0030488c597c
Mac OS X, Intuos tablet fix

Touch input events map nicely to trackpad input now.
However, I noticed the event values are a factor 10 scaled larger compared
to other touch delta's. Makes using touch input on the tablet not so nice.

I found a hack to detect Wacom events, but if it works for more devices?

Anyway - for me the Wacom works perfectly smooth for view manipulations now.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53844 954f8c5b-7b00-dc11-b283-0030488c597c
UI / Scene Context:
* Made Color Management and Audio panel closed by default to save space. 
* Added COMPAT_ENGINES to color management panel. 

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53845 954f8c5b-7b00-dc11-b283-0030488c597c
Get rid of the BRUSH_FIXED_TEX flag, use mapping modes instead. Version
patched all previous texture paint brushes to use tiled mapping since
mappping is now shared between 2d and 3d painting.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53846 954f8c5b-7b00-dc11-b283-0030488c597c
Support view mapping mode in projective texture painting. Disable
masking in that case to match 2d image painting behaviour.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53847 954f8c5b-7b00-dc11-b283-0030488c597c
Movies support for Cycles

This adds support of movie textures for Cycles rendering.

Uses the same builtin images routines as packed/generated images,
but with some extra non-rna hookups from blender_session side.

Basically, it's not so clear how to give access to video frames
via C++ RNA -- it'll require exposing ImBuf to API, doing some
threading locks and so. Ended up adding two more functions which
are actually bad level call, but don't consider it's so much bad
-- we have few bad calls already, which are actually related.

Changed a bit how builtin images names are passing to image
manager. Now it's not just an ID datablock name, but also a frame
number concatenated via '@' character, which makes itpossible to
easily know frame number to be used for movie images, without
adding extra descriptors to image manager.

Decoding of builtin name is a bit slower now, but it should be
still nothing in comparison with rendering complexity.

Also exposed image user's frame_current to python API, which
is needed to get absolute frame number of movie from node's
image user.

P.S. Generated/packed images are also using bad level call but
only does it to make things more clear here.  Either all images
are using C++ RNA here or no images does. That's the most clear
for now.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53848 954f8c5b-7b00-dc11-b283-0030488c597c
Style cleanup: spaces at the end of lines

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53849 954f8c5b-7b00-dc11-b283-0030488c597c
fix for glitch in X11 with tablets.

Notices this while using continuous-grab, since this is disabled when the tablet is being used.
Quite often I would use the tablet then drag a button with the mouse but blender would still have the tablet enabled.
This error would cause other parts of blender to behave incorrectly too since wmEvents would have wmTabletData set, operators check for this in some cases.


The problem was blender didn't reliably get ProximityOut events, eg:
  moving the cursor outside the window with the tablet, then back over the window with the mouse -
  meant blender didn't get a 'ProximityOut' event and would keep the active stylus value set.

For now, when the processing events and the active stylus is set, run a check that the tablet is still in proximity.


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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53851 954f8c5b-7b00-dc11-b283-0030488c597c
draw the brush size with pressure applied (when the tablet is used), nice to see the actual size used.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53852 954f8c5b-7b00-dc11-b283-0030488c597c
Shape enhanced method exaggerates a shape using a Laplacian smoothing operator in the reverse direction.
http://wiki.blender.org/index.php/User:Apinzonf/shape_enhanced

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53853 954f8c5b-7b00-dc11-b283-0030488c597c
sculpt mode: there was no UI access to the brushes 'use_space' option, yet its used to draw the interface and by sculpting tool as well.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53854 954f8c5b-7b00-dc11-b283-0030488c597c
revert previous commit, the properties here are confusing since there are 2 rna properties to access the same value.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53855 954f8c5b-7b00-dc11-b283-0030488c597c
fix for airbrush not using tablet pressure (any brush with BRUSH_SPACE disabled).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53856 954f8c5b-7b00-dc11-b283-0030488c597c
optimize bmesh operations that use triangle BMFace's (dyn-topo and mesh conversion).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53857 954f8c5b-7b00-dc11-b283-0030488c597c
fix for GHOST/X11 using uninitialized memory for the tablets active state. (possible cause of reported glitches in tablet use).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53858 954f8c5b-7b00-dc11-b283-0030488c597c
speed-up dyn-topo by storing the edge-loops rather then edge-faces.
- no need for bm_triangle_other_vert_find(), the other vert is known relative to the loop.
- no need for bm_face_edge_backwards(), the verts are in order in the loop.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53859 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: double, float - conversion warnings.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53860 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: rename BMVert *v[3]; --> 'v_tri', since 'v' is normally for single verts.


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