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:
authorGeoffrey Bantle <hairbat@yahoo.com>2007-06-04 23:18:19 +0400
committerGeoffrey Bantle <hairbat@yahoo.com>2007-06-04 23:18:19 +0400
commitba958bea0f4b49f87644fdf02cbc2ebba826a6b8 (patch)
treec77b55535bcedafc71b11e279c9c00f5256f7d31 /source/blender/makesdna/DNA_customdata_types.h
parentd5ee6fc865f16bd3abe1ad7d2fe6aa0be43576a9 (diff)
-> 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)
Diffstat (limited to 'source/blender/makesdna/DNA_customdata_types.h')
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index b9f6ab0e60b..1c1676ba277 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -64,7 +64,10 @@ typedef struct CustomData {
#define CD_ORIGINDEX 7
#define CD_NORMAL 8
#define CD_FLAGS 9
-#define CD_NUMTYPES 10
+#define CD_PROP_FLT 10
+#define CD_PROP_INT 11
+#define CD_PROP_STR 12
+#define CD_NUMTYPES 13
/* Bits for CustomDataMask */
#define CD_MASK_MVERT (1 << CD_MVERT)
@@ -77,6 +80,10 @@ typedef struct CustomData {
#define CD_MASK_ORIGINDEX (1 << CD_ORIGINDEX)
#define CD_MASK_NORMAL (1 << CD_NORMAL)
#define CD_MASK_FLAGS (1 << CD_FLAGS)
+#define CD_MASK_PROP_FLT (1 << CD_PROP_FLT)
+#define CD_MASK_PROP_INT (1 << CD_PROP_INT)
+#define CD_MASK_PROP_STR (1 << CD_PROP_STR)
+
/* CustomData.flag */