Fix properties.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53415 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: text editor formatting enums were named crypticly, also add asserts if the continuation values are wrong (which can happen with buffer overflows on formatting).


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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53417 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: enum for formatting char (avoid confusion when '#' is a comment for // in OSL)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53418 954f8c5b-7b00-dc11-b283-0030488c597c
add syntax highlighting color for symbols


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53419 954f8c5b-7b00-dc11-b283-0030488c597c
add templates menu for OSL, use preprocessor directive color for decorators in python.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53420 954f8c5b-7b00-dc11-b283-0030488c597c
OSL Syntax Highlighting:
* Added the remaining shader types
* Some comment and link fixes. 

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53421 954f8c5b-7b00-dc11-b283-0030488c597c
OSL Templates:
* Add 3 simple templates:
** empty_shader.osl: A basic shader declaration to start with
** wireframe.osl: Simple wireframe shader
** noise.osl: Simple noise shader, with 3 noise types. 

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53422 954f8c5b-7b00-dc11-b283-0030488c597c
OSL Templates: remove unnecessary stdosl.h include.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53423 954f8c5b-7b00-dc11-b283-0030488c597c
Revert change from Jens, wrong pointer check in the code.

That change made all scrollwheel events be handled as if it was a swipe gesture.
Old style mouse wheel didn't work anymore.

This version should work for everyone, but we need more mac testers :)



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53424 954f8c5b-7b00-dc11-b283-0030488c597c
16 bit PNG write support

This commit adds a support of saving 16bit PNG files.

Alpha for such files would be premultiplied, would be corrected
with an upcoming alpha premul cleanup (it's not the only format
which will output 16bit image with premul alpha).

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

Rotate with two-finger trackpad swipes should follow same principle as
for panning. This is first commit - for clarity.

Remaining issue is that for each system preset (in your OS) blender should
work as you expect too... pan, rotate and zoom gestures might need
each an own direction preset. Might be also messy, but then things can at
least work for everyone. Thinking it over and testing more now.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53426 954f8c5b-7b00-dc11-b283-0030488c597c
add casting checks for the style checker to detect casts formatting in an un-blender-like way


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53427 954f8c5b-7b00-dc11-b283-0030488c597c
style cleanup: casts, some casts had odd formatting, but very few. Style checker script detects this now so easy to detect this if new code is added that doesnt follow blenders style.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53428 954f8c5b-7b00-dc11-b283-0030488c597c
optimization for text drawing:
- dont set the color for each character, check if it changes from the previous one.
- dont memcpy text into a null terminated string to draw, instead rely on the length argument to BLF_draw().


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53429 954f8c5b-7b00-dc11-b283-0030488c597c
Fix crash in syntax color code when drawing a text editor with no text.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53430 954f8c5b-7b00-dc11-b283-0030488c597c
Import the RangeTree library into extern

RangeTree is a simple C++ tree set for storing non-overlapping scalar
ranges. Original source from:
https://github.com/nicholasbishop/RangeTree

Also update the build systems to include RangeTree.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53431 954f8c5b-7b00-dc11-b283-0030488c597c
Add BM_edge_calc_squared_length() query function

Same as BM_edge_calc_length(), but avoids square root for cases where
only comparison is needed.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53432 954f8c5b-7b00-dc11-b283-0030488c597c
Add function to find closest point in triangle to another point

New function is closest_to_tri_v3() in BLI_math_geom.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53433 954f8c5b-7b00-dc11-b283-0030488c597c
Disable fall through to global undo from paint/sculpt undo

Undoing/redoing in sculpt and other paint modes should only use the
mode-specific undo, not global undo. It is now consistent with edit
mode and avoids tricky interaction between the two systems.

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