Image buffer rectangle operation optimization: Remove a switch statement
outside of loop and remove a function call. Should give a little speedup when
painting inside the image editor.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55033 954f8c5b-7b00-dc11-b283-0030488c597c
patch [#34103]
from Lawrence D'Oliveiro (ldo)

More use of bool type, necessitating adding inclusion of BLI_utildefines.h, or moving it up in the inclusion order if it was already included, in various places
- storage.c: make some variables only used in bli_builddir local to that
- storage.c: BLI_file_descriptor_size should allow 0 as a valid file descriptor
- path_util.c: make pointers to non-reentrant storage returned from folder routines const, necessitating making variables holding these returned pointers const elsewhere as well
- path_util.c: BLI_string_to_utf8 closes iconv context in case of conversion error
-  blf_lang.c: fill_locales routine now has its own "languages" local variable to construct paths (was stealing internal storage belonging to BLI_get_folder before)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55035 954f8c5b-7b00-dc11-b283-0030488c597c
patch [#34103] dir_contents.patch
from Lawrence D'Oliveiro (ldo)

- storage.c: Simplify BLI_dir_contents and make it and its internal subsidiary routines reentrant
- Moved common code for disposal of a struct direntry to new routine BLI_free_filelist in storage.c, and put calls to it in interface_icons.c and filelist.c
- Took out inclusion of BLI_fileops_types.h from BLI_fileops.h and put it explicitly into .c files that need it (which turned out to be only 7 of the 35 files that were including the former)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55036 954f8c5b-7b00-dc11-b283-0030488c597c
patch [#34103] fileops_1.patch
from Lawrence D'Oliveiro (ldo) 

Add comments and use of bool type in fileops.c


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55037 954f8c5b-7b00-dc11-b283-0030488c597c
patch [#34103] 	fileops_file_is_writable.patch, fileops_file_is_writable_2.patch
from Lawrence D'Oliveiro (ldo)

More efficient implementation of BLI_file_is_writable using access(2) instead of actually opening file.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55038 954f8c5b-7b00-dc11-b283-0030488c597c
patch [#34103] 	storage_bli_file_size.patch
from Lawrence D'Oliveiro (ldo)

more efficient implementation of BLI_file_size that doesn't open the file.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55039 954f8c5b-7b00-dc11-b283-0030488c597c
patch [#34103] storage_bli_dir_contents.patch
from Lawrence D'Oliveiro (ldo) 

BLI_dir_contents no longer changes current working directory.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55040 954f8c5b-7b00-dc11-b283-0030488c597c
patch [#34103] path_util_cleanups.patch
from Lawrence D'Oliveiro (ldo)

- Better argument name for BLI_cleanup_path and BLI_cleanup_file
- remove redundant BLI_add_slash already done by BLI_cleanup_dir


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55041 954f8c5b-7b00-dc11-b283-0030488c597c
patch [#34103] path_util_split_dirstring.patch, path_util_split_dirstring_2.patch, path_util_split_dirstring_3.patch
from Lawrence D'Oliveiro (ldo)

Get rid of BLI_splitdirstring, replace with calls to BLI_split_dirfile, BLI_split_dir_part and BLI_split_file_part as appropriate.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55042 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: remove unused member of direntry struct, also add include for building on osx.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55043 954f8c5b-7b00-dc11-b283-0030488c597c
fix for building with mingw in since recent changes.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55044 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: remove unused argument from bli_builddir


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55045 954f8c5b-7b00-dc11-b283-0030488c597c
fix for building with msvc


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55046 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34507, adding reroute node into invalid links would crash the compositor.

Compositor relies on correctly tagged invalid links, but the nodeInternalRelink function used to replace reroute nodes in localization did not correctly take this flag into account. If a node replaces a link with an invalid upstream link the resulting link must also be flagged invalid.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55047 954f8c5b-7b00-dc11-b283-0030488c597c
Sanity check in the cut-links operator, make sure preview jobs are not running before modifying the node tree.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55048 954f8c5b-7b00-dc11-b283-0030488c597c
Update Ceres to 1.5RC3

It brings optimization of DENSE_QR and DENSE_SCHUR solvers.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55049 954f8c5b-7b00-dc11-b283-0030488c597c
Switch from DENSE_NORMAL_CHOLESKY to DENSE_QR

DENSE_QR is better behaved numerically and after recent
changes from Sameer there's no big difference in speed.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55050 954f8c5b-7b00-dc11-b283-0030488c597c
Bug fix #34534

Fix for 2.66a

The new Copy/Paste objects feature could hang in eternal loop.
Only happens for objects that refer to another scene via linkage.

This fix then crashed Blender, needed to add a NULL check for screens.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55051 954f8c5b-7b00-dc11-b283-0030488c597c
View All operator for motion tracking dopesheet.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@55052 954f8c5b-7b00-dc11-b283-0030488c597c
Simple deform modifier: replace factor property by angle for twist and bend
modes, so we can show degrees rather than radians. Still refers to the same
DNA variable to keep backwards compatibility.

Patch #33807 by Gottfried Hofmann.

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