Code cleanup:
Separate 2D painting functions away from brush.c, which should implement
the brush API and into its own file, paint_2D.c.
Ideally projective texturing and 2D painting should be totally separate,
however functionality is still interleaved mostly in the
BKE_brush_painter_paint function. The functionality of this function can
possibly be done using the brush stroke functions instead.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53492 954f8c5b-7b00-dc11-b283-0030488c597c
rename paint_2D to paint_image_2D. Catering for possible name conflicts
with other 2D paint systems.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53493 954f8c5b-7b00-dc11-b283-0030488c597c
Patch [#29035] Vertex colour baking

There is a new option in the Bake panel to enable baking to vertex colors. Unlike regular baking, this mode does not require a UV map or image to bake to, however the object must have a vertex color layer.

Thanks to:
 - AutoCRC for funding
 - Brech van Lommel and Dalai Felinto for their initial advice on how to implement it
 - Campbell Barton for helping to make this feature work with modifiers and bmesh


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53494 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for what appears to be a typo (seq_prev is always NULL) - found while
reviewing the latest Clang reports


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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53496 954f8c5b-7b00-dc11-b283-0030488c597c
rename image paint_image_2d to lowercase (as we have for view2d).


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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53499 954f8c5b-7b00-dc11-b283-0030488c597c
Replacing/cleaning up some gibberish...


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53501 954f8c5b-7b00-dc11-b283-0030488c597c
dyntopo speedup for smooth brush, no need to search for the shared vert-face loop, instead just iterate over the loops.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53502 954f8c5b-7b00-dc11-b283-0030488c597c
extend BLI_buffer
- add option to calloc or not, existing code wasnt consistent here, would calloc on first alloc but not on realloc, also - the static memory was never zero'd.
  use flag BLI_BUFFER_USE_CALLOC to ensure all new memory is zero'd (static/alloc/realloc's).

- add BLI_buffer_declare_static / BLI_buffer_declare so its possible to have a buffer that never uses static memory.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53503 954f8c5b-7b00-dc11-b283-0030488c597c
add assert to BLI_buffer_at if a type is given different to 'elem_size'


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53504 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#33726] keyframe_insert() and keyframe_delete() with index=-1 always fail

The bug was introduced in r53297, was calling pyrna_struct_anim_args_parse() twice for no reason, perhaps baddly applied patch?.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53505 954f8c5b-7b00-dc11-b283-0030488c597c
Fix playercompile with stub for BKE_brush_gen_texture_cache

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53506 954f8c5b-7b00-dc11-b283-0030488c597c
Fix [#33189] AFTER 2.65 - Units in doc strings in ocean modifier.

Also:
* Fixes a (op prop) bug which prevented, once you had baked and freed ocean once, to bake again.
* Fixed infinite values of acumulated foam when baking with foam_fade values above 1.0, now simply clipping accumulated foam value to 1.0, as already done for the "instantaneaous" foam value returned by BKE_ocean_jminus_to_foam().
* Added missing RNA descriptions.
* Made foam_fade unanimatable!
* Added in UI some missing properties that are imho useful: random seed, size (kindof 'surface scaling'), and foam_fade (baking only).
* Removed custom lerp() func from bke's ocean.c, BLI's interpf does exactly the same thing (the first two args are just in reversed order). Note: this could most certainly be done in other parts of the code, bpy's mathutils for e.g. has its own linear interpolation code for vectors and matrices :/).
* Did some general code cleanup (mostly line length and no C++ -> C comments)...

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53507 954f8c5b-7b00-dc11-b283-0030488c597c
Bug fix - post 2.65a

New option "Keep Session" was not using "untitled.blend" as default save name,
in case a startup.blend was kept as session. Could give bad accidents.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53508 954f8c5b-7b00-dc11-b283-0030488c597c
changes needed for EDL import to work again.
- add sequence.update(data=False) function.
- made some sequence vars editable.
- correct some comments.

also rename rna function sequence.getStripElem() --> strip_elem_from_frame()


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53509 954f8c5b-7b00-dc11-b283-0030488c597c
Some UI message fixes...

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53510 954f8c5b-7b00-dc11-b283-0030488c597c
revert 53478, it looks this is still useful for a couple of use cases in non-projective texture painting such as stamping a static texture and using image space size in pixels.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53511 954f8c5b-7b00-dc11-b283-0030488c597c
r53351 removed a NULL check for name in defgroup_name_index(). name can be NULL when deforming verts in the BGE, so I'm adding a NULL check back in.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53512 954f8c5b-7b00-dc11-b283-0030488c597c
add id property clear function (matching the same python function for dicts/lists)


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