Triangulate Modifier changes - using scanfill

The ear loop method is potentially too slow (OˆN).

We are not using the 'beauty' option at the moment.
I'll incorporate that next.
(and later specific methods for quad splitting)

Patch done in collaboration (and reviewed by)  with Campbell Barton.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60618 954f8c5b-7b00-dc11-b283-0030488c597c
remove redundant NULL checks


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60619 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: redundant includes and add minor comments.


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

We now support the combined layer of Photoshop files (stored as layer 0
in the file). This way users can keep their files as multilayer PSD and
Blender always handle them as flat images.

For perfect alpha this requires an OpenImageIO update:
https://github.com/OpenImageIO/oiio/commit/342cc2633ff590a3bb278481c61ae798c7148361

Photoshop sample files:
https://github.com/OpenImageIO/oiio-images

Brecht has some pending fixes to push for OIIO as well, so we may as
well wait to update our libraries.

What works:
===========
* 8bit images (with or without alpha)
* 16bits images (alpha discarded)
* Photoshop files saved with 'Maximum Compatibility'
* Cycles, Blender internal,  BGE (and player)

Known limitations
(due to OIIO dependency):
=========================
* Images with less than 4 channels show a wrong thumbnail (bug may be in  OIIO)
* Packed images are not supported
* We do not write PSD files.

Note: old Blenders have support for PSD via Quicktime library. But due
to license issues this was discontinued.

Many thanks for Brecht van Lommel for reviewing the patch, suggesting
multiple improvements and to help solving the alpha issue.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60621 954f8c5b-7b00-dc11-b283-0030488c597c
fix building when WITH_PSD is OFF, stub is not needed afterall

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60622 954f8c5b-7b00-dc11-b283-0030488c597c
fix for building with OPENJPEG after PSD commit

reported via email, patch by PerfectionCat

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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60624 954f8c5b-7b00-dc11-b283-0030488c597c
Move guarded objetc allocation to a guardedalloc header

Also made libmv-capi use guarded objetc allocation.
Run into some suspecious cases when it was not so
clear whether memory is being freed or not.

Now we'll know for sure whether there're leaks or not :)

Having this macros in a guardedalloc header helps
using them in other areas (for now it's OCIO and libmv,
but in the future it'll be more places).

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60625 954f8c5b-7b00-dc11-b283-0030488c597c
re-enable activating the text input field for new popup dialog boxes,
I'd disabled this for 2.68 since it caused bug [#36109].

This fix now only enabled text activation for popups. (so the toolbar textboxes are skipped)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60626 954f8c5b-7b00-dc11-b283-0030488c597c
Segregate all paint cursor overlay options under their own "Overlay"
panel in paint modes. Also expose all options of mask textures in the
mask texture panel, even if there is no texture, just like regular
textures are presented.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60627 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for evil bug in last commit, the image painting brush was being used
for the overlay option in all paint modes.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60628 954f8c5b-7b00-dc11-b283-0030488c597c
better naming for overlay panel, also only expose texture overlay for
modes that support it.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60629 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#37007] Save to file - increment number doesn't update background color of filename field if hovered


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

Added support for derivative map baking, which
is accessable as a dedicated baker type. Works
pretty much the same as displacement map baker,
but gives you derivative map.

In fact, inernally this baker is just a filter
which applies on the result of displacement map.

Both regular and multires baking are supported.

Patch by Morten Mikkelsen and self.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60631 954f8c5b-7b00-dc11-b283-0030488c597c
Implementation of curve mapping in GLSL

The title says it all, now having curve mapping
enabled in color management settings wouldn't
force fallback from GLSL to CPU based color space
conversion.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60632 954f8c5b-7b00-dc11-b283-0030488c597c
Paint cursor overlays: Delete the cursor texture overlay resources when
exiting a paint mode.

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

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60634 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #36991, After rendering with Sampled Motion Blur, the moving objects place is wrong.
With mblur the render function was setting scene frame for each blur sample and calling DAG update, but not after the last sample is finished, leaving the scene in the wrong frame.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60635 954f8c5b-7b00-dc11-b283-0030488c597c
Fix uber evil (-15 alignment points) own buffer overflow

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@60636 954f8c5b-7b00-dc11-b283-0030488c597c
Fix [#37012] The new export split normal does nor produce correct results.

Was a silly error introduced in algo during optimization, vertices having sharp and smooth edges would only get the first poly's normal for each "smooth loop group".

Also done a (minor) optimization, and some comment fixes.

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