fix [#30493] GE crashes on exit because of using freed mtfaces from tessfaces

prevent gpu_draw.c holding a pointer to a freed array.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44858 954f8c5b-7b00-dc11-b283-0030488c597c
documentation edit to address bmesh py api bug [#30453]

warn when addons are not found when running cmake. 


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44859 954f8c5b-7b00-dc11-b283-0030488c597c
Add 'level' field to struct MDisps, companion to 'totdisp'.

Gets initialized when loading old files and updated at the same places
totdisp is updated. Saves having to do log+sqrt to extract level from
totdisp.

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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44861 954f8c5b-7b00-dc11-b283-0030488c597c
bmesh py api: finished todo - editable select_history

eg:
  bm.select_history = vert, face, edge

  bm.select_history.add(edge)


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

  Vector.angle_signed(other)
  for 2D vectors to get the clockwise angle between them.

  in BLI math its called - angle_signed_v2v2()

shorthand for...

  atan2f((v1[1] * v2[0]) - (v1[0] * v2[1]), dot_v2v2(v1, v2))

also corrects compile error in last commit.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44863 954f8c5b-7b00-dc11-b283-0030488c597c
Don't wait for sculpt stroke to create PBVH.

This idea is borrowed from the multires modifier, which already
checked if the object was in sculpt mode and, if so, created the
PBVH. That check is now moved higher up the chain into
mesh_build_data(), so that it occurs for CDDerivedMesh too.

This also replaces an assert in cdDM_getPBVH for tesselated mesh faces
with a call to create them if missing.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44864 954f8c5b-7b00-dc11-b283-0030488c597c
Add BKE mesh function to update edge/poly hidden flags from verts.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44865 954f8c5b-7b00-dc11-b283-0030488c597c
Add new CCG accessor functions.

ccg_gridsize() converts a level into gridsize, ccg_factor() is for
converting coordinates between different multires levels.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44866 954f8c5b-7b00-dc11-b283-0030488c597c
Add MDisps.hidden bitmap.

Updates SDNA, customdata functions, and file read/write. Also adds
accessor functions to BKE paint.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44867 954f8c5b-7b00-dc11-b283-0030488c597c
Add DerivedMesh.gridHidden and CCGDM implementation.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44868 954f8c5b-7b00-dc11-b283-0030488c597c
Skip hidden elements in PBVH iterator, raycast, and drawing.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44869 954f8c5b-7b00-dc11-b283-0030488c597c
Copy hidden flag to vertices when applying multires modifier.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44870 954f8c5b-7b00-dc11-b283-0030488c597c
Skip hidden elements in PBVH iterator, raycast, and drawing.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44871 954f8c5b-7b00-dc11-b283-0030488c597c
Add partial visibility operator including keymaps and menu items.

Uses HKEY for border hide, CTRL+HKEY for border show, and ALT+HKEY for
show all.

Documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/PartialVisibility

Code review:
http://codereview.appspot.com/5695043

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44872 954f8c5b-7b00-dc11-b283-0030488c597c
Fix some errors in partial visibility drawing.

Also changed show-in-border key to SHIFT+H as suggested by Daniel
Salazar.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44873 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for multires undo with partial visibility.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44874 954f8c5b-7b00-dc11-b283-0030488c597c
Changes to python-defined add object operators:

- Reset rotation value when toggling Align to View property
  which correctly re-alignes object on continuous property
  toggling and fixes issue
  #30510: [2.62] Add Mesh - Torus - "Align to View" cannot be switched back when toggling off

- Moves all generic object-add properties into a helper function
  which might be easily re-used.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44875 954f8c5b-7b00-dc11-b283-0030488c597c
Switch *nix fileops from calling external commands via system() to posix api calls
which resolves some possible issues with operating files with quotes and backslashes.

Also this might resolve (or at least help) resolving compilation error on GNU Hurd platform
which will help a lot maintaining Blender for Debian.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@44876 954f8c5b-7b00-dc11-b283-0030488c597c
Avoid a sigsev after 44830 when reports is empty, clang compile work

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