bridge tool: support for bridging loops with different numbers of vertices.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56693 954f8c5b-7b00-dc11-b283-0030488c597c
fix for 2 crashes in bridge tool mixing open/closed loops with different vertex counts.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56694 954f8c5b-7b00-dc11-b283-0030488c597c
correct assert for driver evaluation,
also add asserts for listbase functions when the list is NULL, and use noreturn attribute for jpeg_error.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56695 954f8c5b-7b00-dc11-b283-0030488c597c
quiet sign conversion warnings and reduce sign conversion for BLI_string, and BLF.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56696 954f8c5b-7b00-dc11-b283-0030488c597c
Optimize face-select drawing (weight/vertex paint mode face selection) 
with bmesh theres no need for edge-hash lookups, replace EdgeHash with BLI_bitmap.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56697 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35317: crash with boolean modifier using an object whose library linked
mesh datablock went missing.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56698 954f8c5b-7b00-dc11-b283-0030488c597c
Image paint: 2D painting now supports texture masks and does masking more
consistent with projection painting.

Also did some refactoring of this code, moving the brush image creation code
out of brush.c and making it consistent with image updating code.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56699 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35319: python 2x2 matrix inverse and adjugate were wrong.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56700 954f8c5b-7b00-dc11-b283-0030488c597c
bridge option to bridge loop pairs,
change the operator option to an enum: Connect Loops - open/closed/pairs
because it was getting confusing having all as bools.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56701 954f8c5b-7b00-dc11-b283-0030488c597c
bridge tool: add support for face selection.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56702 954f8c5b-7b00-dc11-b283-0030488c597c
remove wanton use of array reallocation for mesh smoothing.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56703 954f8c5b-7b00-dc11-b283-0030488c597c
bmesh recalculate normals - remove BLI_array reallocation, the max size of the array is known.
replace with STACK_* macros (moved to BLI_utildefines.h).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56704 954f8c5b-7b00-dc11-b283-0030488c597c
3D viewport render preview:

- Put it available as a default now (no debug value needed)
- Fixed viewport size error, viewport was badly set
  (visible with border render, property regions)
- Fixed hanging lock in conflict between drawing and initialize
  new renders.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56705 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for [#35224] Transform Orientation - order inconsistency

Fix turned out to remove as much "manual UI" from 3D view header as possible. Mode selector and all transform manipulators/orientations stuff are now RNA-based UI (leaving basically only edit mesh select modes with custom handlers, as they have some quite specific features).

To achieve this, four main modifications were done:
* enum-operator-generated menus are now MENU (i.e. dropdown lists) in headers too.
* All bit-flag enums expanded in ROW buttons now have a handling consistent with e.g. layers, or what we already have for transform manipulators, i.e. clicking select only one element, shift-click to select multiple ones.
* Consequently, the three RNA booleans manipulators flags are merged into a single bit-flag enum (yes, this is also an API change, though I doubt many scripts use it).
* Now the width of enum-based dropdown lists is computed from longest item name in enum, no more from a dummy place holder string (when no label/name is given).

All this allows to remove some code from 3DView/transform areas, that was actually mostly duplicating RNA/operator one.

Also done a few optimizations here and there (among others, do not pass &numitems to RNA_property_enum_items() when you do not need it, saves at least an iteration over enum items to count them).

Many thanks to Brecht for the reviews!

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56706 954f8c5b-7b00-dc11-b283-0030488c597c
Fix material/lamp drivers not working sometimes when they were used by multiple
objects, found while looking into another bug.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56707 954f8c5b-7b00-dc11-b283-0030488c597c
Cycles / Math:
* Add M_2PI_F and M_4PI_F constants and use them inside the codebase. 

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56708 954f8c5b-7b00-dc11-b283-0030488c597c
remove BLI_array allocations from uv/color reverse, rotate. 


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56710 954f8c5b-7b00-dc11-b283-0030488c597c
Fix crash when closing blend files with no line styles


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56711 954f8c5b-7b00-dc11-b283-0030488c597c
fix for crash with new bridge method used with invalid edge-loops.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56712 954f8c5b-7b00-dc11-b283-0030488c597c
Render Layers UI
Expand the Layers panel by default on Blender Internal as well.



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