From 49b0dbd3a30805d924ff4d5b219666cd8b1f7c67 Mon Sep 17 00:00:00 2001 From: "Sv. Lockal" Date: Sun, 18 Aug 2013 20:07:49 +0000 Subject: Add comments for outliner's treestore and treehash (no functional changes) --- source/blender/makesdna/DNA_space_types.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 85655ce09bd..3e1196fb45a 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -246,6 +246,13 @@ typedef struct SpaceOops { View2D v2d DNA_DEPRECATED; /* deprecated, copied to region */ ListBase tree; + + /* treestore is an ordered list of TreeStoreElem's from outliner tree; + * Note that treestore may contain duplicate elements if element + * is used multiple times in outliner tree (e. g. linked objects) + * Also note that BLI_mempool can not be read/written in DNA directly, + * therefore readfile.c/writefile.c linearize treestore into TreeStore structure + */ struct BLI_mempool *treestore; /* search stuff */ @@ -253,7 +260,12 @@ typedef struct SpaceOops { struct TreeStoreElem search_tse; short flag, outlinevis, storeflag, search_flags; - struct GHash *treehash; /* note, allows duplicates */ + + /* search index for every element in treestore; + * It is ok for treehash to contain duplicates, because the semantics of its usage + * allows duplicates (see check_persistent) + */ + struct GHash *treehash; } SpaceOops; -- cgit v1.2.3