diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-12-13 05:08:47 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-12-13 05:08:47 +0300 |
commit | 9a3f3699c3fc8ca32cff2d2d8a1c16e0f5cee30a (patch) | |
tree | 7c9fcfcc0d65dd4c296e4db0e27fc558e1fe3b9e /source | |
parent | e2e8ea9ed17dbe353e4aa8cac73b47cde9f8a24d (diff) |
Added a 'LinkData' struct for use with ListBases.
It is used to store a reference to some data that is already in another ListBase. Sometimes, these are needed for small one-off situations, where a custom struct seems overkill...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesdna/DNA_listBase.h | 9 | ||||
-rw-r--r-- | source/blender/src/space.c | 10 |
2 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h index 10a1b59fb01..e81cb886d6f 100644 --- a/source/blender/makesdna/DNA_listBase.h +++ b/source/blender/makesdna/DNA_listBase.h @@ -43,11 +43,20 @@ extern "C" { #endif +/* generic - all structs which are used in linked-lists used this */ typedef struct Link { struct Link *next,*prev; } Link; + +/* use this when it is not worth defining a custom one... */ +typedef struct LinkData +{ + struct LinkData *next, *prev; + void *data; +} LinkData; + /* never change the size of this! genfile.c detects pointerlen with it */ typedef struct ListBase { diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 84c77521841..984c1e65feb 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -1893,7 +1893,12 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) } } - else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) addsegment_nurb(); + else if ELEM(G.obedit->type, OB_CURVE, OB_SURF) { + addsegment_nurb(); + } + else if(G.obedit->type == OB_ARMATURE) { + //fill_bones_armature(); + } } else if(G.qual==LR_CTRLKEY) sort_faces(); @@ -2160,6 +2165,9 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) mergemenu(); DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); } + else if (G.obedit == OB_ARMATURE) { + //merge_armature(); + } } else if ((G.qual==0) || (G.qual==LR_CTRLKEY)) { mirrormenu(); |