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@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@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@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@56276 954f8c5b-7b00-dc11-b283-0030488c597c
Fix cycles build error, RNA C++ API did not properly handle output parameters.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56277 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34714: cycles viewport render would restart when minimizing and unminimizing
a maximized Blender window in Ubuntu Unity. The window size would slightly change
as part of the unminimize effect.

Now cycles waits 0.2 seconds before restarting rendering after a viewport resize,
also a bit less flickery when changing the 3d view size in Blender itself.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56278 954f8c5b-7b00-dc11-b283-0030488c597c
minor fixes
- build with netbsd works again.
- select uv more/less was crashing when called outside image space.
- node RNA property update was crashing when not called in node space.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56279 954f8c5b-7b00-dc11-b283-0030488c597c
Fix rigid body world Solver Iterations not showing in UI and throwing python error.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56280 954f8c5b-7b00-dc11-b283-0030488c597c
Fix crash going to a scene with no camera, with an inactive 3D viewport space.

The regions of the space are stored in a different place depending if it is
active or if another space is in use. The code here was iterating over both
but it should be only one because the other might contain regions of another
space.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56281 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34806: rigid body world settings were not copied with a full scene copy.

Now copying a scene will also duplicate groups that consist entirely of objects
that are duplicated with the scene. The rigid body world will then also pointers
to these new groups.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56282 954f8c5b-7b00-dc11-b283-0030488c597c
Fix two more high DPI / retina draw issues with running jobs in info header and
the node tree name in the node editor.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56283 954f8c5b-7b00-dc11-b283-0030488c597c
Fix build error with scons + msvc, needs pthread include.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56284 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #29932 Left Shift + Numpad 1,2,3 not Aligning to Active

Intermediate Shift+Key messages were resetting modifier flags.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56285 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#35072] View name of 3Dview is clamped in Japanese
just increase size of string to allow for utf8 chars.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56286 954f8c5b-7b00-dc11-b283-0030488c597c
ruler snap adjustments
- when in wireframe mode: don't snap to faces, instead snap to the closest edge/vertex.
- when not in wireframe mode: snap to the front-most element (was a problem that it could snap to an edge/vert behind the face)
- reduce the distance for selecting ruler points, was too easy to accidentally drag a ruler.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56287 954f8c5b-7b00-dc11-b283-0030488c597c
Bugfix [#35075] Physics Panel of Particles Fluid is Truncated

Some RNA Properties were not updated in UI scripts after a recent refactoring
there removing "use_" prefix from some of the boolean properties (strangely
though, while every other property attached to SPHFluidSettings.flag has gone
from "use_factor_blah" to "factor_blah", use_factor_density still keeps the old
prefix).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56288 954f8c5b-7b00-dc11-b283-0030488c597c
ruler snapping
- draw snap circle to make it more obvious when snapping succeeds.
- when not in wire-view, snap to the surface when adding new rulers.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56289 954f8c5b-7b00-dc11-b283-0030488c597c
ruler tweak: don't, snap to edit-object, because it didnt work well when modifiers are applied in editmode.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56290 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35074: Image editor shows color banding on rendered images (even with dither set to 2.0)

Mistake in one of changes to GLSL display function,
missed fallback mode in case dither is non-zero,

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@56291 954f8c5b-7b00-dc11-b283-0030488c597c
fix:#35073 face normals calculation used wrong mloop index

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