Tiny change for gsoc paint curve drawing: numpad enter now draws the curve too.
Update buildbot conf, to enable a 'testbuild' branch in 'force' scheduler.
Texture paint:

* paint slots from cycles only include texture image types
* tweaking with select mouse no longer confirms on release
Buildbot: fix submodule branch issue (we have to fix it on 'master', since default
one can be overriden by custom setting for force scheduler).
Fix crash in cases when first BA step happens with all zero-weighted tracks
Fix T41141, can't paint texture in cycles.

The issue is actually that creating a new image in texture paint mode
will set it always as a stencil image. Internally, the code checks if
the painted image is the same as the stencil and if it is, no painting
is done.

Solution is to expose a boolena to the operator for setting the image as
a stencil (could be an enum in th future for more uses)

Stencil UI is a bit weird here, will definitely redesign.
Freestyle: minor speedup by omitting unnecessary transform matrix operations in the file loader.

Previously the imported mesh data were transformed by a local-to-world projection matrix
through NodeTransform.  Now that the file loader assumes the imported mesh data already
in the camera coordinate system, an indentity matrix was supplied to NodeTransform.
The present commit avoids this redundant matrix operation by using NodeGroup instead of
NodeTransform, recalling the latter is a subclass of the former with extra matrix computations.
Fix T41147: Static BVH shading problem
Fix T41079: Solid black render of object with negative scale and smooth shading

In both cases the issue was caused by negative scaled objects with single mesh
users for which scale gets applied when using static BVH.

Since the on-fly normals calculation land normals for such cases weren't flipped
leading them to point to a wrong direction.

Added a special object flag for this, which is a bit of a bummer because now
we've got less bits for real useful things, but this is the only way to get
proper normals without adding more complexity in the on-fly calculations.
Fix for mixup in startup.blend data init when userprefs.blend was missing

Rename UI_init_userdef_factory to BLO_update_defaults_userpref_blend
This closely matches BLO_update_defaults_startup_blend so makes sense for them to be together.
Cleanup: BKE_scene_set_name mixed G.main & bmain arg
Fix T41116: Motion Blur causes random black surfaces on rigged models
Fix T41115: Motion Blur renders Objects Black - But not in Viewport Preview

This actually extends previous fix to normals and makes it all much nicer now.

Worth doing some intense testing, quick one worked just fine but there always
could be some corner cases.
Fix T41156: UILayout.prop_enum() does not observe "text" parameter override

We do have odd behaviors with name and expanded enums, but in this case it did
not made any sense at all! :)

Note the error was not in RNA, but in C UILayout api itself...
Occlusion Query based selection.

This patch creates an interface for selection mechanisms in opengl. This
makes it possible to switch between occlusion query based or select
rendermode based selection transparently.

This is really useful on graphics drivers that do not accelerate the
select rendermode path (some ATI cards are notorious for this, and the
new path is used by default there), since occlusion queries are always
hardware accelerated due to their use in games.

The option can be found under system - selection. Auto just enables
occlusion queries for ATI users while the rest of the options enforce
one of the two methods always.

There is just one known change, previous code enforced nearest bone to
always get selected, even when mouse selecting near the same position, I
couldn't replicate the behaviour though.

patch by me with edits and review by Campbell.

Thanks!
Fix T41157

Was an issue with python interpretation error. Second part of the bug is
fixed by Campbell.
also minor UI tweak for occlusion UI.
Extended mathutils.Vector.orthogonal() to accept a 2D vector.

Reviewer: Campbell Barton

Differential revision: https://developer.blender.org/D668
Bake-API: Test for cyclic node connection

If the active image node contributes to the final material shader
(meaning it's either directly or indirectly connected to an Output Node)
the user will receive an alert about circular dependency.

Similar to what we do for Blender internal the baking will still happen,
but the user will receive the alert which should prevent the image
saving to happen if the result was not intentional.

Core function to check for node output written by Lukas Toenne.

Reviewers: lukastoenne, campbellbarton

Differential Revision: https://developer.blender.org/D673