From ba958bea0f4b49f87644fdf02cbc2ebba826a6b8 Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Mon, 4 Jun 2007 19:18:19 +0000 Subject: -> Custom Properties for Mesh entities In order to give import/export script authors the ability to add properties to inidividual faces, vertices and edges in the same manner as they are able to do with ID structures three new custom data types have been added to blender for floats, integers and strings. Things to note: -Since property Layers are custom data, they are added to all verts, edges or faces at once. -Only one property layer for each unique property name may exist. In other words, you cannot have a float layer as well as an integer layer both with the same name. -No user interface for this exists at the moment. The following methods and attributes have been added to the Blender.Mesh Python module and it's object types: ->MVert/Edge/FaceSeq: addPropertyLayer(name, type) removePropertyLayer(name) renamePropertyLayer(original name, new name) properties(readonly list.) ->MVert/Edge/Face getProperty(name) setProperty(name, value) ->Mesh module PropertyTypes (readonly dictionary) --- source/blender/blenlib/BLI_editVert.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/BLI_editVert.h b/source/blender/blenlib/BLI_editVert.h index a763ad53f1f..c05d33f2792 100644 --- a/source/blender/blenlib/BLI_editVert.h +++ b/source/blender/blenlib/BLI_editVert.h @@ -106,6 +106,7 @@ typedef struct EditEdge short fast; /* only 0 or 1, for editmesh_fastmalloc */ short fgoni; /* index for fgon, for search */ HashEdge hash; + void *data; /*custom edge data*/ } EditEdge; /* note; changing this also might affect the undo copy in editmesh.c */ @@ -171,7 +172,7 @@ typedef struct EditMesh struct RetopoPaintData *retopo_paint_data; - CustomData vdata, fdata; + CustomData vdata, edata, fdata; #ifdef WITH_VERSE void *vnode; -- cgit v1.2.3