Operators' poll func might be called from anywhere in Blender, so they should
not make any assumption about available context. material, lamp and world
are specific to context from Properties space...
For some reason, labels of buttons in popups/menus were clipped left.
Removed that function (was the only place were it was used), clipping text
by its left is really bad for its understanding!
Instead, extended clip_middle code so that it optionnally preserves a right piece of
the given string (like the shortcut part of a menu label). Think that's what makes
more sense here (note that most menus adapt themselves to their longest item,
we do not have much fixed-width ones, anyway).
Also tweaked a bit clip_middle logic, so that left part always have at least ten chars
(in addition to already existing 'min width' checks).
There was some fuzzyness in `region_overlap_fix()`, using an 'other side' region
as ref to move current one in case their rect would intersect...
New code is a bit more complex, but should handle nicely all situations, mostly
ensuring we only translate an overlap if we find a previous one **on the same side**,
and ensuring we also never have intersecting overlapping regions from different sides
(since this does not work nice at all).
It now uses the tile size to split the job. For CPU this may add
overhead, but for GPU this is highly needed.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D690
Indeed, constructive modifiers are highly likely to modify CDLayers like vgroups or vcols!
See vertexgroup2.blend file ({F93770}) in T40523, especially obvious with subsurf modifier.
This solves the crash, but indices might be wrong after the separation.
There are loads of other ways to confuse hook indices in both meshes and
curves, for now considering this a TODO.
* Don't compute expf() for every step, instead sum the intermediate values and calculate it every N (8 for now) steps. This helps a few percent (~5% on a cube with wave texture) in my tests here.
If user drags away from initial position, menu changes to drag style and
returning to that position won't remake the menu click-style. Allows to
use the threshold indicator to cancel the pie.
Add precision mode to radial operator by keeping the shift key pressed.
Precision mode works by checking difference between absolute window
coordinates and the point where shift was pressed and adding those to
the distance between that point and the radial center. This allows
bigger negative/positive range than using a strict radial scheme.