Fix for crash when assigning NULL pointer to node group node_tree property. This is generally allowed (though operators usually would prevent it).

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57358 954f8c5b-7b00-dc11-b283-0030488c597c
Follow up to r57354: WeightVG and Wave modifiers too need to handle tex id refcount ;)

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57359 954f8c5b-7b00-dc11-b283-0030488c597c
Attempt to fix #35665: disable correlated multi jitter sampling on the GPU for now,
seems to be giving issues with CUDA 4.2 but I can't figure out why exactly.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57360 954f8c5b-7b00-dc11-b283-0030488c597c
Cycles lamp specials menu now includes separate X/Y size for area lamps
and strength (for the basic default node setup, this can't work with with
arbitrary nodes).

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57361 954f8c5b-7b00-dc11-b283-0030488c597c
Fix cycles backwards compatibility for specular_toon shader this actually needs
to be done in cycles itself to keep compatibility for bytecode too.

Also fix broken button to compile OSL from the text editors, this got broken after
recent change to disable editing of library linked nodes.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57362 954f8c5b-7b00-dc11-b283-0030488c597c
Cycles: ray visibility panel is now also available for the world, works same as
meshes and lamps. The light path node already made this possible but it's a bit
faster to render this way and convenient.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57363 954f8c5b-7b00-dc11-b283-0030488c597c
Fix cycles OSL node sockets not preserving values when updating with new code.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57364 954f8c5b-7b00-dc11-b283-0030488c597c
Fix msvc compile error with subdivide use_smooth_even option.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57365 954f8c5b-7b00-dc11-b283-0030488c597c
Cycles / Wavelength to RGB node:
* Added a node to convert wavelength (in nanometers, from 380nm to 780nm) to RGB values. This can be useful to match real world colors easier.

* Code cleanup:
** Moved color functions (xyz and hsv) into dedicated utility files.
** Remove svm_lerp(), use interp() instead. 

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Wavelength

Example render:
http://www.pasteall.org/pic/show.php?id=53202

This is part of my GSoC 2013. (revisions 57322, 57326, 57335 and 57367 from soc-2013-dingto). 

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57368 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35561: freestyle + read full sample layers = crash.

Now add_freestyle() in pipeline.c takes a second argument to enable/disable
stroke rendering.  When stroke rendering is disabled, the function allocates
data structures but does not perform stroke rendering.  The allocated data
structures (mostly left unpopulated with data elements) are intended to allow
for the Read Full Sample Layers (Shift-R) command in the compositor.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57369 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#35656] Crash on File Browser


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57370 954f8c5b-7b00-dc11-b283-0030488c597c
fix for problem where curve handles in editmode could be obscured by other selected objects (referred to in [#35669])


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57371 954f8c5b-7b00-dc11-b283-0030488c597c
another case that should have been in r57371, also reduce type conversions in compassion.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57372 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for distortion happens when flipping mesh normals

Issue was caused by missing X/Y displacement components
flip when flipping the normals (flipping the normals changes
the tangent space apparently and displacement vectors need
to be modified to correspond to new space).

Reported by Jonathan Williamson in IRC.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57373 954f8c5b-7b00-dc11-b283-0030488c597c
Fix compilation error caused by recent wavelength node commit

Apparently, it's bad idea to rely on compiler to cast NULL
which is (void*)0 to int -- and in fact if i was a compiler
would also generate an error.

Further, couldn't see why we need to pass NULL or 0 th add_node,
argument value is defautl to 0 already.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57374 954f8c5b-7b00-dc11-b283-0030488c597c
Use OpenMP threads in bm_loop_interp_mdisps

Gives approx 2x speedup on my laptop on such operations
as mesh subdivision in edit mode. Desktops with fancier
CPUs could benefit even more.

Thanks Campbell for review!

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57375 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35704: Simplify on scene with dupli recursion crashes

Couple of issues here:

- User shouldn't be able to run into dupligroup recursion.
  It was checking already when setting a group for dupli.
  Added check to operator which adds object to group.

- It's still possible files with recursion are hanging around,
  so made simplify function robust to such kind of crap.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57376 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35405: properties editor preview render restarted unnecessarily after F12 render.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57377 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35251: cycles crash rendering with a particular user preferences configuration.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@57378 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #35711: cycles border render issue after recent changes.

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