T37247 - Modifier "Mask" not updated correctly when switching from objects
Blender Internal: Add "Lamp Data" shader node that allows shaders to acquire information such as light vector from specified Lamp.

For now this provides the following outputs:

- Color
- Light Vector
- Distance
- Shadow
- Visibility Factor

Note: Color output is multiplied by the lamp energy.  Multiplication of
color*max(dot(light_vector,normal_vector),0)*shadow*visibility_factor
produces the exact same result as the Lambert shader.

Many thanks to Brecht for code review and discussion!
UI: fix errors in screen edge drawing, moving and region hiding.

Summary:
- Fixes an off-by-one error in screen_test_scale() which causes the areas and
  regions to draw one pixel bigger on the right and top side of the window,
  therefor hiding one line of pixels.
- Fixes an off-by-one error in rct_fits() which causes regions to incorrectly
  hide even though it would fit inside the area.
- Correctly set the limits for the screen edge move operator so it will always
  go up to AREAMINX and headery.
- Change screen_find_active_scredge() so it doesn't show the arrows cursor on
  the screen edges along the window border.

The import thing to understand is how integer rects are used in this part of the
code. They are constructed as a lower left and top right point and are INCLUSIVE.
Meaning that if you have a rect's xmin = 10 and xmax = 30 then the total number
of pixels is 21. So to get the size of a rect you have to do xmax - xmin + 1,
which is easy to forget and result in off-by-one errors.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D41
UIList: add proper support for ctrl-c/v (copy/paste) of names.

Dev notes: Another hack in ui_do_button(), to add a specific handling of LISTROW in case of copy/paste event, which fixes the same 'not working if no mouse mouve' issue for those actions as well. Also added an helper func to switch from listrow to text button, as we now do that in two different places.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D40
Fix: jump to next/previous marker shortcut keys conflicted with others in clip editor.

Disable them for now and leave to for keymap revamp to assign them shortcut keys or not.
Code Cleanup: rename vars for detecting change to be more consistent

rename change/is_change/is_changed/modified -> changed
also use bools over int/short/char and once accidental float.
Fix T37617: "Add plane" was adding a 2*2 grid

Was a regression from rBaa3c06b41ca9, hope this time all things are OK again (note the X/Y subdivision values still are different than before (-1 for same result), but imho they make more sense this way).
Correct fix for T37617, (own recent regression)
Code cleanup: As Sergey stated on bf-committers one should use id_us_min() if the user counter has to be decremented and not decrement the counter by hand.
i18n module cleanup: remove hack used during svn -> git transition phase!
Fix T37225: UV map for closed curves incorrectly generated

Summary:
Curve ORCO was not calculating properly for cyclic 2D curves.

- Needed to split vertices for blender internal renderer.
  Otherwise it's not possible to map last face to a proper
  texture location.

- Needed to tweak curve->mesh conversion to respect cyclic
  flag along U direction.

- Removed check for orcodm in curve.c:add_orco_dm since
  this code is only called if there're enabled constructive
  modifiers on the curve.

Reviewers: brecht

Maniphest Tasks: T37225

Differential Revision: http://developer.blender.org/D45
Usual ui messages fixes...
User Interface: don't show macro args in tooltips

was often making much too big strings to show in a tip.
Fix 37571: Knife Select should be disabled when no faces are selected

also check a similar case for bisect
fix for error in own recent commit, removing orientations.
Sculpt Dynamic Topology: support collapsing edges without subdividing edges as well

This allows you to choose between subdivide edges, collapse and both. Being able to
only collapse edges can be useful to simplify meshes with accidentally introducing
more detail.

Reviewed By: psy-fi, carter2422

Differential Revision: http://developer.blender.org/D15
View3D: disable auto-perspective when orbiting the view out of a camera.
Code cleanup: Typo fix for image function, patch by kgeogeo.

Differential Revision: http://developer.blender.org/D46