Broken by font wrap commit rBf2341f829654c4dc97, there was actually two things here:
* Using non-initialized color (which lead to transparent drawing...), we need to use new
`blf_draw_buffer__start/end` helpers here too, made them shared internally.
* Using `draw_str_i18n_nbr` as `draw_str[i]` length, ugh! That's the number of utf8 glyphs of
translated string, not the length of untranslated string!
This fix must be backported to final 2.76.
Cleanup and rework a bit text_cursor_set_to_pos_wrapped(), it did not handle correctly negative y valuesi,
because it was only checking lines starting from first visible one.
Mostly, we now directly get line matching given y position (be it an invisible one) from the helper
(renamed `get_line_pos_wrapped()`), instead of first visible one, which allows us to get rid of
additional complexity of looping over next lines until we find correct one.
This code remains rather complex to follow, added some asserts to ensure everything works as expected,
and tested it rather seriously, but DO NOT backport this to 2.76!
If t->mode remains edge/vert slide, restoreTransObjects() ends up calling
projectVert/EdgeSlideData(), which tries to access invalid customdata...
Not sure why we call again restoreTransObjects() and resetTransRestrictions() here tbh,
but safer not to change that for now.
Should be backported to 2.76 if possible.
More precise description of the issue: Clicking on the right side of a num-slider button with Continuous Grab enabled sometimes caused cursor to jump to the inner value indicator even though text editing was started.
Happened because data->ungrab_mval wasn't reset correctly after dragging.
Windows-only bug, mmap & co are not threadsafe by default on this platform, so we have to add a dedicated
spinlock for them in win32.
Note that we may try to get rid of those mmap later, but not for 2.76!
To be backported to final 2.76...
The issue was introduced by original Cycles point density support commit,
it lead to a constant density of 1 for object verticies point density source.
Mostly added missing :arg: clauses -- these caused the :type:-clauses
that were already in the RST files to be hidden from the output HTML.
I also fixed some argument types from 'list' to 'Vector' where applicable
and corrected some obvious mistakes.
We need custom context here, those are often very short names so context collision is pretty easy.
Also some minor changes (and avoid shadowing varnames)...
This is a mere bandage, that whole area is known broken anyway, but at least it should prevent the crash.
Note that that kind of stuff (the efd->index being a pointer) is really bad practice imho...
Should be backported to final 2.76.
Notes:
- There is still some bvh cache code, but that is from the engines initial commit, we might clean this up further or keep it.
- Changes in util_cache.h/.c are kept, this might be re-used in the future.