Fix for VBO drawing in multires sculpting

Was a mistake in a code cleanup commit, r51118.

Fixes bug [#32919] Sculting performance regression in svn_51118
projects.blender.org/tracker/?func=detail&aid=32919&group_id=9&atid=498

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51412 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: minor style change & quiet warning, also add assert for BM_vert_splice() to check for invalid use.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51413 954f8c5b-7b00-dc11-b283-0030488c597c
DM_to_bmesh_ex() now initializes index values when running in empty meshes. saves running extra loop on vert/edge/face data if these values are needed after.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51414 954f8c5b-7b00-dc11-b283-0030488c597c
small quadric library ported from Laurence Bourn's LOD_decimator LOD_Quadric class. not used just yet.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51415 954f8c5b-7b00-dc11-b283-0030488c597c
decimate modifier rewrite to use bmesh (#ifdef-disabled by default for now).
- maintains quads & ngons
- supports some customdata (weight paint for example works fine).

TODO
- add suppory for loop data (UV's / VCol's).
- outputs invalid geometry when heavily reducing some meshes, needs to be made stable in these cases.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51416 954f8c5b-7b00-dc11-b283-0030488c597c
Fix: Text fields for Generator FModifier were too small

This was caused by the x^n labels being far too large. Also, replaced old string
functions with "safer" versions


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51417 954f8c5b-7b00-dc11-b283-0030488c597c
[#32921] Fix: Python error triggered when installing an addon via 'install addon' button

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51418 954f8c5b-7b00-dc11-b283-0030488c597c
simplify addon install print, Now it only prints the source and destination dirs, with a list of addons added.
don't think its needed to print the full path of each addon.

also remove the __MACOX check, its harmless and people can make sure there zips dont have cruft in them before distributing them.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51419 954f8c5b-7b00-dc11-b283-0030488c597c
add option to initialize heap with a known number of elements, since this may be known in advance - it avoids re-allocing too much.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51420 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #32705: Esc a value change doesn't recalc compositor

Seems the issue was caused by G.is_break set to Truth on both escape
press and release. This ended up in situation when after press event
compositor was tagged to redraw and new job was started. On escape
release this compositor job was cancelled.

Made it so G.is_break is setting on escape press event only.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51421 954f8c5b-7b00-dc11-b283-0030488c597c
fix for some issues with modal mesh tool interaction.

When inset and bevel used the mouse input as a distance value, the change could be far too great when zoomed in, or far too small when zoomed out. Now get the pixel-size based on the center point of the selection.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51422 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #32219: Inconsistent influence of Units Scale on new objects

Made it so meshes, curves, surfaces and metaballs are scaling to a grid cell size,
which makes them behave consistently now.

There're still issues to be resolved still:

- Lattice is not scaled to grid cell size yet, it uses slightly different add
  function which makes scaling a bit tricky and hacky. Would prefer to do a
  bit bigger refactor here, so it's a TODO for now.

- Cameras, speakers and other helpers are not scaling. They don't have data
  on which scale could be applied and perhaps it should be some kind of draw
  scale. Also would consider it's a TODO for now.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51423 954f8c5b-7b00-dc11-b283-0030488c597c
Cycles/ Layer Weight Node:
* Small tweak for the blend value, to avoid division by zero. 

Thanks to Brecht for pointing out the solution.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51424 954f8c5b-7b00-dc11-b283-0030488c597c
Add stub for new ED_view3d_grid_scale().

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51425 954f8c5b-7b00-dc11-b283-0030488c597c
Additional debug assert in the compositor for checking correct conversion of Nodes to Operations. This will trigger an assert failure whenever a node has remaining socket connections after conversion. This would mean that not all sockets have been properly relinked and helps detect incomplete code.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51426 954f8c5b-7b00-dc11-b283-0030488c597c
More UI messages fixes and tweaks, BKE_report<->BKE_reportf, and stuff to translate...

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51427 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #32920: cloth physics with collision exploding in some cases, due to
uninitialized memory usage.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51428 954f8c5b-7b00-dc11-b283-0030488c597c
Minor fix to BKE_reportf(): also output the report's type when printing to console.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@51429 954f8c5b-7b00-dc11-b283-0030488c597c
Fix [#32925] Center cursor (shift+C) crashing blender after duplicating bone in armature edit mode.

Center Cursor uses BKE_object_minmax(), which uses pchans' bone member to check whether a bone is visible or not. But after a duplication, the duplicated pchan->bone are NULL, skiping in this case (as if they were hidden, not optimal but should do the work for now - anyway, using pchan's values in Edit mode does not really make sense, imho).

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