use modified vertex coords for calculating display thickness and intersections.

internal improvement to editmesh_bvh.c

- optionally pass cage-coords as an arg, rather then calculating the coords in BKE_bmbvh_new(),
  since all callers already have coords calculated.
- de-duplicate coords creation function from knife and bmbvhm, move into own generic function: BKE_editmesh_vertexCos_get()


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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56123 954f8c5b-7b00-dc11-b283-0030488c597c
make bmbvh call BM_mesh_elem_index_ensure(), further calls to utility functions assert if the index values becomes dirty.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56124 954f8c5b-7b00-dc11-b283-0030488c597c
add mesh distort display mode (highlights distorted faces)


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

Pulldown menus with long shortcut text labels got clipped badly occasionally.
Made the offset follow DPI better.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56126 954f8c5b-7b00-dc11-b283-0030488c597c
Make freestyle use local Main for temporary objects

This means main database is no longer pollutes with
temporary scene and objects needed for freestyle
render.

Actually, there're few of separated temporary mains
now. Ideally it's better to use single one, but it's
not so much trivial to pass it to all classes. Not
so big deal actually.

Required some changes to blender kernel, to make it
possible to add object to a given main, also to
check on mesh materials for objects in given main.
This is all straightforward changes.

As an additional, solved issue with main database
being infinitely polluted with text blocks created
by create_lineset_handler function.

This fixes:
- #35003: Freestyle crashes if user expands objects in FRS1_Scene
- #35012: ctrl+f12 rendering crashes when using Freestyle

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56127 954f8c5b-7b00-dc11-b283-0030488c597c
fix range for face distortion and display for concave ngons.


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

With extreme narrow scaled editors, the slider/mask code in View3d could deliver
zero sized or invalid window matrices.

Needs confirmation from Sergey if it works :)




git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56129 954f8c5b-7b00-dc11-b283-0030488c597c
View2D could potentially divide stuff by zero, giving bad matrices.




git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56130 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34970: in glsl mode the vertex paint face mask is not visible

Added face selection code to GLSL draw. We do this for Cycles
already, shall behave expected now.

Checked by Ton, thanks!

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56131 954f8c5b-7b00-dc11-b283-0030488c597c
More i18n tools tweaks:
* Remove difflib's quick_ratio() call, from quick tests looks it is four times slower than ratio(), and yet it gives the same results...
* Moved code to find all po's in a dir into its own func (will be used by i18n addon tools too).

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56132 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for #35010, Node Groups don't show up anymore in Material Surface. Fixing the node tree view was a bit of a todo item after pynodes.

To make the type-dependent socket linking in this template a bit more manageable, there are now separate functions that generate "items" for a particular node type consisting of the socket index, name and possibly additional properties required (currently only node groups vs. all other types). This is still nowhere near flexible enough to be used as a generic template all node systems, but works for now.

In order to make this usable as a generic tool we will have to devise a way of storing, comparing, applying node settings *outside of actual node instances*. Then each node needs to tell how sockets are generated based on these properties. For the current nodes this would be far too complicated ...

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

Blender Render: setting alpha to zero for ray-transp material with refraction did not
render. Was optimized away.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56134 954f8c5b-7b00-dc11-b283-0030488c597c
Fix: view plane for sculpting did not work correctly for rotated
objects. Reuse the object space view vector. Also, minor cleanup, reused
cache values instead of requering.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56135 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for access freed scene when doing freestyle render

It's more like an ownership thing, but it's not so much
clear who actually is an owner of temporary scene, so
for now just ensure Render does not have link to it
after strokes are rendered.

There're also suspicious thing related on why separate
RE_free_database is needed for freestyle renders, but
that's also another story.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56136 954f8c5b-7b00-dc11-b283-0030488c597c
Enable numpy install for buildbot

Numpy is compiled at build environment, but
importing it from blender somehow fails.

Will need help of Campbell for this.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56137 954f8c5b-7b00-dc11-b283-0030488c597c
Beware of SUBSURAFACES (sounds latin)

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56138 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for #35015, Alpha input in color selectors was showing 0 precision. Probably caused by r55910. The NUMSLI button now needs either -1 or an explicit precision value in a2.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56139 954f8c5b-7b00-dc11-b283-0030488c597c
A few fixes for recent own commit r56133.

* Index was assigned after increment, leading to NULL pointer access later on when looking up socket from list
* Copying default_value requires a valid NULL pointer for clean check
* Was using default_values as parameters instead of sockets, void pointers just passed through without warning ...

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56140 954f8c5b-7b00-dc11-b283-0030488c597c
Disabling live resize for Windows for now.
Bug #34990

However, cleanscreen on redraw is still disabled, so when resizing blender will have frozen image. 

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