- Removed validate() callback for MDisps layer. It wouldn't actually work
correct from CustomData layer and all needed data might be validated from
BMesh interpolation level. Also this callback was never actually used in
BMesh, so can't see why we'll want to have it in structures.
- Removed layrInterp_mdisps callback. Interpolation now happens from
another level (bmesh_interp) and this callback isn't needed anymore.
- Removed all function from multires.c which were used by old interpolation
stuff and seems to be useless for other usages.
- multires_topology_changed is still marked as a TODO, Probably it's not
needed anymore, buy better to keep for now until it'll be 100% clear this
function isn't needed and all needed re-allocations happens in bmesh_interp.
Otherwise, it'll be needed to be ported to new system.
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.
As with multires, this change calculates face normals rather than
using vertex normals when the node is flat-shaded.
Flat-shading with VBO on non-multires meshes is still wrong, but
fixing that would require larger changes to our vertex buffers.
thanks to Nicholas Bishop for finding the cause of the problem.
don't tesselate on load, this means me->mface will be NULL by default.
we may need to have this set if existing uses of this array are not resolved before release - so add a define USE_TESSFACE_DEFAULT, to change this easily.
this is a rather indirect fix - need to take care here.
===========
initial merge from BMesh branch,
this replaces the existing mesh format and editmode data structures, for more info see:
http://wiki.blender.org/index.php/Dev:2.6/Source/Modeling/BMesh
this is the work of quite a few developers over the years.
Key Contributors
================
* Geoffrey Bantle (aka) Briggs, original author.
* Joe Eager (aka) joeedh
More recently
* Howard Trickey
* Ender79 aka Ender79 :)
What to Expect
==============
In general blender shouldnt crash on files or totally fail to load scenes,
painting tools etc have been tested to work.
* its quite easy to make the tesselator fail (show holes, missing faces), with non planer ngons.
* most modifiers are working fine but a few had to be re-written - bevel, array - array is much slower, bevel will probably be changed to match trunk soon.
* NavMesh BGE feature isn't functional yet.
* Some UV sticth tools still need porting.
* hair doesnt work right on ngons yet.
* many python scripts will break.
* a python api to BMesh needs to be written still.
(for todo's in code do a searh for BMESH_TODO)
On collada import a -1 layer_index from CustomData_get_layer_index (CD_MTFACE) was used.
This then managed to overwrite last mface's data with uv-set's name so at least it gave a clue where to look for :]
* New armature_mat_bone_to_pose, which is just the reverse of armature_mat_pose_to_bone (currently used by armature evaluation code only, but might be used by constraints space conversion code too, see note below).
* Found another place where another (a bit erroneous) pose_to_bone code existed (apply_targetless_ik(), in transform_conversion.c, used by "auto ik" option), replaced it by a call to armature_mat_pose_to_bone.
Notes:
* All those changes leave many #if 0 commented code, I will remove those in a few weeks.
* There is at least one other place where generic armature_mat_(pose_to_bone/bone_to_pose) functions should be usable: the space conversion function of constraints (constraint_mat_convertspace(), in BKE's constraint.c), but here I have some problems (old code is also somewhat erroneous, but using new one makes old rigs using bone space constraints wrong, e.g. sintel one, and it’s just impossible to make conversion code...). So I'll wait and investigate more for this one.