Issue was caused by fact that viewer node might re-size ImBuf used for
viewer node result, so if several viewer nodes are running for inputs
with different resolutions it'll result in a crash,
Now copied behavior or pre-tile compositor -- execute viewer node which
has NODE_DO_OUTPUT flag, so no several nodes would be calculated at once.
Should be pretty ok because calculation of several viewers doesn't actually
make sense because there's only one buffer they might use and it's getting
re-calculated when changing active viewer node.
The issue was caused by CDDM_tessfaces_to_faces not dealing with CD layers.
There was already function BKE_mesh_convert_mfaces_to_mpolys which converted
mfaces to mpolys with converting all CD layers. Made it a bit more general so
it might work with given arrays of faces/polys and re-used it from CDDM module.
Checked with UV and sculpt data from Blender 2.61 and it loaded nice, so
hopefully there's no regressions in loading older files.
Added new flag to Imageuser which indicates whether user frame calculation is needed.
This flag is getting set in BKE_image_signal and handled in actual image usage areas
where both image user and current frame is known.
Some operators like curve presets, color sample and some more were using object's
mode to distinguish in which mode user is currently painting. Such approach fails
in cases when there's paint mode active in 3D viewport and Image Editor.
Changed logic here to use some context's state like active space which helps
distinguishing current paint mode more accurate.
Ported all areas which uses paint_get_active() to new paint_get_active_from_context().
There're still some calls to paint_get_active(), but that shouldn't be harmful due
to that places indeed have object's mode as priority when getting paint mode.
* NLA Strip colors are now themable
* Changed the "Active Action"/"Summary" colors to be a bit more muted. The new
colors are now closer to those for keyframes, though they are still different
enough to be clearly distinguishable.
* Removed some colors wihch don't seem to be used (from NLA theme colors)
* Added function to get theme colors + alpha as floats
Mesh were the shape of a human.
Optimizing for anything less would not make sense because it happens ~instant
moving to 10 tree from binary tree increased speed by ~30%
initiating additional searches with the first increased speed by ~99%
Now function completes in less than two seconds on my amd 2,6ghz