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...
This commit is contained in:
Joshua Leung
2007-12-13 02:08:47 +00:00
parent e2e8ea9ed1
commit 9a3f3699c3
2 changed files with 18 additions and 1 deletions

View File

@@ -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
{

View File

@@ -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();