Added custom vertex/edge/face data for meshes:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 20 Nov 2006 04:28:02 +0000 (04:28 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 20 Nov 2006 04:28:02 +0000 (04:28 +0000)
commite435fbc3c5a00e5b63c1cd2609ab6828187660d3
tree3f1da9c51451dee55a203cd001d37f8774d2582f
parent0a7c43c6e5fc7d5d75a4645eca1164cede2d03a6
Added custom vertex/edge/face data for meshes:

All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.

Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData

Replaced TFace by MTFace:

This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.

Removed DispListMesh:

This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.

Removed ssDM and meshDM DerivedMesh backends:

The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.

This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
89 files changed:
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/BKE_bad_level_calls.h
source/blender/blenkernel/BKE_cdderivedmesh.h
source/blender/blenkernel/BKE_customdata.h
source/blender/blenkernel/BKE_displist.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/BKE_subsurf.h
source/blender/blenkernel/bad_level_call_stubs/stubs.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/include/BDR_drawmesh.h
source/blender/include/BDR_editface.h
source/blender/include/BDR_vpaint.h
source/blender/include/BIF_editmesh.h
source/blender/include/BSE_types.h
source/blender/makesdna/DNA_customdata_types.h
source/blender/makesdna/DNA_mesh_types.h
source/blender/makesdna/DNA_meshdata_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/python/api2_2x/Mesh.c
source/blender/python/api2_2x/NMesh.c
source/blender/radiosity/extern/include/radio_types.h
source/blender/radiosity/intern/source/radio.c
source/blender/radiosity/intern/source/radpostprocess.c
source/blender/radiosity/intern/source/radpreprocess.c
source/blender/render/intern/include/render_types.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/rendercore.c
source/blender/src/booleanops.c
source/blender/src/buttons_editing.c
source/blender/src/drawimage.c
source/blender/src/drawmesh.c
source/blender/src/drawobject.c
source/blender/src/drawview.c
source/blender/src/editdeform.c
source/blender/src/editface.c
source/blender/src/editmesh.c
source/blender/src/editmesh_lib.c
source/blender/src/editmesh_mods.c
source/blender/src/editmesh_tools.c
source/blender/src/editobject.c
source/blender/src/editsima.c
source/blender/src/editview.c
source/blender/src/filesel.c
source/blender/src/fluidsim.c
source/blender/src/header_view3d.c
source/blender/src/imagepaint.c
source/blender/src/meshtools.c
source/blender/src/multires.c
source/blender/src/poseobject.c
source/blender/src/sculptmode.c
source/blender/src/space.c
source/blender/src/transform_conversions.c
source/blender/src/unwrapper.c
source/blender/src/verse_mesh.c
source/blender/src/verse_object.c
source/blender/src/vpaint.c
source/blender/yafray/intern/export_File.cpp
source/blender/yafray/intern/export_Plugin.cpp
source/blender/yafray/intern/export_Plugin.h
source/blender/yafray/intern/yafray_Render.cpp
source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
source/gameengine/BlenderRoutines/KX_BlenderGL.h
source/gameengine/BlenderRoutines/KX_BlenderPolyMaterial.cpp
source/gameengine/BlenderRoutines/KX_BlenderPolyMaterial.h
source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/GamePlayer/common/GPC_PolygonMaterial.cpp
source/gameengine/GamePlayer/common/GPC_PolygonMaterial.h
source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
source/gameengine/GamePlayer/common/GPC_RenderTools.h
source/gameengine/Ketsji/BL_Material.h
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.h
source/gameengine/Ketsji/KX_PolygonMaterial.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.h