Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2006-11-20 07:28:02 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2006-11-20 07:28:02 +0300
commite435fbc3c5a00e5b63c1cd2609ab6828187660d3 (patch)
tree3f1da9c51451dee55a203cd001d37f8774d2582f /source/blender/blenkernel/BKE_displist.h
parent0a7c43c6e5fc7d5d75a4645eca1164cede2d03a6 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/BKE_displist.h')
-rw-r--r--source/blender/blenkernel/BKE_displist.h31
1 files changed, 3 insertions, 28 deletions
diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h
index 0bb74ca94b5..4bcd5d8955c 100644
--- a/source/blender/blenkernel/BKE_displist.h
+++ b/source/blender/blenkernel/BKE_displist.h
@@ -35,6 +35,8 @@
#ifndef BKE_DISPLIST_H
#define BKE_DISPLIST_H
+#include "DNA_customdata_types.h"
+
/* dl->type */
#define DL_POLY 0
#define DL_SEGM 1
@@ -82,30 +84,6 @@ struct ListBase;
struct Material;
struct Bone;
struct Mesh;
-struct TFace;
-struct EditMesh;
-struct EditEdge;
-struct EditFace;
-
-typedef struct DispListMesh DispListMesh;
-struct DispListMesh {
- int totvert, totedge, totface;
- struct MVert *mvert;
- struct MEdge *medge;
- struct MCol *mcol;
- struct MFace *mface;
- struct TFace *tface;
- float *nors; // facenormals
-
- int dontFreeVerts, dontFreeNors, dontFreeOther;
-};
-
-void displistmesh_free(DispListMesh *dlm);
-
-void displistmesh_to_mesh(DispListMesh *dlm, struct Mesh *me);
-
-DispListMesh *displistmesh_copy(DispListMesh *odlm);
-DispListMesh *displistmesh_copyShared(DispListMesh *odlm);
/*
* All the different DispList.type's use the
@@ -141,7 +119,7 @@ extern void addnormalsDispList(struct Object *ob, struct ListBase *lb);
extern void count_displist(struct ListBase *lb, int *totvert, int *totface);
extern void freedisplist(struct ListBase *lb);
extern int displist_has_faces(struct ListBase *lb);
-extern void makeDispListMesh(struct Object *ob);
+extern void makeDerivedMesh(struct Object *ob);
extern void makeDispListSurf(struct Object *ob, struct ListBase *dispbase, int forRender);
extern void makeDispListCurveTypes(struct Object *ob, int forOrco);
extern void makeDispListMBall(struct Object *ob);
@@ -154,8 +132,5 @@ void filldisplist(struct ListBase *dispbase, struct ListBase *to);
void fastshade_free_render(void);
-
-void displistmesh_add_edges(DispListMesh *dlm);
-
#endif