alternate fix for [#24887] - r33294.

Casting a ray onto an editmesh was building a derivedMesh, raytree, then freeing for every ray-cast.
Noticed while using ruler+snapping in editmode.

Instead of attempting to align the MFace and edit-mesh tessfaces, just use editmesh for ray-casting.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56254 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for broken Material color/alpha/thickness modifiers.
Reverted part of the trunk revision 56234 (RNA attribute consistency edits).

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56255 954f8c5b-7b00-dc11-b283-0030488c597c
simple optimizations for bvhtree_from_mesh_faces() for editmesh, was quite inefficient (unneeded loops, not breaking out of face loop early). 
also correct own oversight - use TRANSFORM_DIST_MAX_RAY rather then when checking for max value in snapDerivedMesh. 


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56256 954f8c5b-7b00-dc11-b283-0030488c597c
fix for mistake in own recent commit r56249 with rna_EffectorWeight_path


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56257 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#34657] Smoothing will not be updated in object mode, when hiding faces in edit mode and changing shape.
remove the option to skip hidden faces in BM_mesh_normals_update, use openmp to speedup recalculation for high poly meshes.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56258 954f8c5b-7b00-dc11-b283-0030488c597c
Fix bug #34611: bevel overlap limit
The previous fix limited overlap, but is sometimes
too conservative, and artists want way to turn off
the limiting, so added 'Allow Overlap' option to
modifier.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56259 954f8c5b-7b00-dc11-b283-0030488c597c
fix glitch where vertex baking wouldn't always refresh the mesh.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56260 954f8c5b-7b00-dc11-b283-0030488c597c
fix relating to r56260, when in vertex paint mode the mesh would have tessfaces allocated, which prevented baking from updating vertex colors.
baking now clears tessfaces.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56263 954f8c5b-7b00-dc11-b283-0030488c597c
use more rna-constant name for bevel clamping.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56264 954f8c5b-7b00-dc11-b283-0030488c597c
Fix material node editor not working when Blender Game is selected as render engine.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56266 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35063: GLSL texture node Value output was not outputting alpha.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56267 954f8c5b-7b00-dc11-b283-0030488c597c
fix for crash changing transform modes rotate/edge-slide/grab. setCustomPoints() assumed allocated member was big enough which wasnt the case when switching from rotate.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56268 954f8c5b-7b00-dc11-b283-0030488c597c
allow to scale and rotate from edge/vertex slide. 


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56269 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35008: compositing nodes viewer border (ctrl + B) not working correct inside node groups.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56270 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for #34739 and #35060, avoid ambiguity in compositor viewer nodes.

The design changes coming with pynodes for the node editor allow editing multiple node groups or pinning. This is great for working on different node groups without switching between them all the time, but it causes a problem for viewer nodes: these nodes all write to the same Image data by design, causing access conflicts and in some cases memory corruption. This was not a problem before pynodes because the editor would only allow 1 edited node group at any time. With the new flexibility of node editors this restriction is gone.

In order to avoid concurrent write access to the viewer image buffer and resolve the ambiguity this patch adds an "active viewer key" to the scene->nodetree (added in bNodeTree instead of Scene due to otherwise circular DNA includes). This key identifies a specific node tree/group instance, which enables the compositor to selectively enable only 1 viewer node.

The active viewer key is switched when opening/closing node groups (push/pop on the snode->treepath stack) or when selecting a viewer node. This way only the "last edited" viewer will be active.

Eventually it would be nicer if each viewer had its own buffer per node space so one could actually compare viewers without switching. But that is a major redesign of viewer nodes and images, not a quick fix for bcon4 ...

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56271 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35068: bpy.ops.node.output_file_add_socket() now works on the active node
if there is no "node" in the context, for scripting convenience.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56272 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34783: smoke simulation crash when changing frame while preview rendering.

Added a mutex lock for smoke data access. The render was already working with a
copy of the volume data, so it's just a short lock to copy things and should not
block the UI much.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56273 954f8c5b-7b00-dc11-b283-0030488c597c
rna api function scene.ray_cast now returns the object and its matrix (incase its a dupli).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56274 954f8c5b-7b00-dc11-b283-0030488c597c
Fix blender internal preview rendering continuously restarting after recent
viewport render changes.

Actually was an older issue that would cause unnecessary preview render restarts
if the render result was not allocated before it was drawn. Now the render result
is being reallocated each time for freestyle which made the issue worse.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56275 954f8c5b-7b00-dc11-b283-0030488c597c
Fix flickering black tiles in preview render, after viewport render commit, it's
nicer when the new preview draws over the old one.

The code was changed so that the render result is freed all the time because
freestyle manipulates render layers. Now it only does it when freestyle is
enabled so cycles and regular blender internal can still avoid it.

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