interpolating loop was copying face attributes including selection, checked all users of this function and its safe to remove the call (which is bad to begin with).
Gives approx 2x speedup on my laptop on such operations
as mesh subdivision in edit mode. Desktops with fancier
CPUs could benefit even more.
Thanks Campbell for review!
accessing a bmesh from python would reallocate all customdata layers.
add an assert to BM_data_layer_free(), when its called unnecessarily since its reallocating all layers.
projecting it. The original paper suggests to simply interpolate between
the two points of an edge if the distance of the point to that edge is
smaller than a threshold.
* Fixed both 3D and 2D code to utilize this. Possibly other places in
blender where this scaling is done will have to be adjusted.
* Changed vertex interpolation to use 2D interpolation, since it already
did projection on plane and 2d calculations are faster.
* Also added notifier on hard recalc when uvcalc_transfor_correction is
used. Results in instant feedback on UV editor when edge sliding.
* double default edge allocation size (double the number of verts/faces).
* CustomData_bmesh_init_pool was using allocsize & chunksize as the same variable. Now use type specific chunk size.
* bmesh copy and editmode conversion now allocate the BMesh mempool size needed for the entire vert/edge/loop/face arrays since its known already.
* change BMO_elem_flag_* defines to inline functions.
* BMO_slot_map_insert() is too big for an inline function - un-inline it.
* remove redundant casts.
functions instead of own macros for vectors.
- Double precision isn't needed here at all. It only makes it impossible to use
mathutils, adds extra float<->double conversions without any benefits.
(current multires interpolation is already an approximate method and it can't
be improved using double precision)
This is needed because displacement might been interpolated from a grid
with different orientation and in this case X and Y components of displacement
are need to be flipped in needed order.
Order of flipping is determining by projecting source grids axis orientation
on target grid axis. This probably will give some unwanted artifacts when
interpolating non-planar face but currently can't think about better way
to determine how to flip displacement.
This commit makes operators like Subdivide works much more unpredictable
for sculpting data, but this stuff should be rethinked much more global
because current approach is not acceptable.