2.5 - MetaBalls are now animateable
authorJoshua Leung <aligorith@gmail.com>
Mon, 3 Aug 2009 13:09:23 +0000 (13:09 +0000)
committerJoshua Leung <aligorith@gmail.com>
Mon, 3 Aug 2009 13:09:23 +0000 (13:09 +0000)
18 files changed:
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/mball.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/animation/anim_channels.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_action/action_header.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_graph/graph_header.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_nla/nla_header.c
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_meta_types.h
source/blender/makesdna/DNA_sequence_types.h
source/blender/makesrna/intern/rna_meta.c

index 7278fee5ab8b250c6519bf22dc47c501b618e558..560ae76e4d125bef396068ba20d641fff454bbd2 100644 (file)
@@ -71,7 +71,7 @@ static short id_has_animdata (ID *id)
        switch (GS(id->name)) {
                        /* has AnimData */
                case ID_OB:
-               case ID_CU:
+               case ID_MB: case ID_CU:
                case ID_KE:
                case ID_PA:
                case ID_MA: case ID_TE: case ID_NT:
@@ -1442,6 +1442,9 @@ void BKE_animsys_evaluate_all_animation (Main *main, float ctime)
                // TODO: we probably need the same hack as for curves (ctime-hack)
        EVAL_ANIM_IDS(main->key.first, ADT_RECALC_ANIM);
        
+       /* metaballs */
+       EVAL_ANIM_IDS(main->mball.first, ADT_RECALC_ANIM);
+       
        /* curves */
                /* we need to perform a special hack here to ensure that the ctime 
                 * value of the curve gets set in case there's no animation for that
index 74d56e81a87774c6af380b14b6559fed334e3a0f..c7058d7d8db1977a40c93fa648c92f2bca7eaca2 100644 (file)
@@ -55,6 +55,7 @@
 #include "BKE_main.h"
 
 /*  #include "BKE_object.h" */
+#include "BKE_animsys.h"
 #include "BKE_scene.h"
 #include "BKE_blender.h"
 #include "BKE_library.h"
@@ -90,6 +91,7 @@ void free_mball(MetaBall *mb)
 {
        unlink_mball(mb);       
        
+       if(mb->adt) BKE_free_animdata((ID *)mb);
        if(mb->mat) MEM_freeN(mb->mat);
        if(mb->bb) MEM_freeN(mb->bb);
        BLI_freelistN(&mb->elems);
index 876b07eef894fe23caa2dc10d1587eb6fee6cb1d..8dde100dff2298e048f4613cbe5366d900886772 100644 (file)
@@ -2488,7 +2488,8 @@ static void lib_link_mball(FileData *fd, Main *main)
        mb= main->mball.first;
        while(mb) {
                if(mb->id.flag & LIB_NEEDLINK) {
-
+                       if (mb->adt) lib_link_animdata(fd, &mb->id, mb->adt);
+                       
                        for(a=0; a<mb->totcol; a++) mb->mat[a]= newlibadr_us(fd, mb->id.lib, mb->mat[a]);
 
                        mb->ipo= newlibadr_us(fd, mb->id.lib, mb->ipo); // XXX depreceated - old animation system
@@ -2501,6 +2502,9 @@ static void lib_link_mball(FileData *fd, Main *main)
 
 static void direct_link_mball(FileData *fd, MetaBall *mb)
 {
+       mb->adt= newdataadr(fd, mb->adt);
+       direct_link_animdata(fd, mb->adt);
+       
        mb->mat= newdataadr(fd, mb->mat);
        test_pointer_array(fd, (void **)&mb->mat);
 
@@ -9946,6 +9950,9 @@ static void expand_mball(FileData *fd, Main *mainvar, MetaBall *mb)
        for(a=0; a<mb->totcol; a++) {
                expand_doit(fd, mainvar, mb->mat[a]);
        }
+       
+       if(mb->adt)
+               expand_animdata(fd, mainvar, mb->adt);
 }
 
 static void expand_curve(FileData *fd, Main *mainvar, Curve *cu)
index da68132700dcb7772b5ce1885f39801af99a07e7..05ea60b50df93f5c25459117579c0a91a73fb313 100644 (file)
@@ -1297,6 +1297,7 @@ static void write_mballs(WriteData *wd, ListBase *idbase)
 
                        /* direct data */
                        writedata(wd, DATA, sizeof(void *)*mb->totcol, mb->mat);
+                       if (mb->adt) write_animdata(wd, mb->adt);
 
                        ml= mb->elems.first;
                        while(ml) {
index f518b5b0a2ee879e634e142654edc80a7f2560c8..235a3039b2caab772d1e4ff1c5753dc5438f6d08 100644 (file)
@@ -56,6 +56,7 @@
 #include "DNA_key_types.h"
 #include "DNA_lamp_types.h"
 #include "DNA_material_types.h"
+#include "DNA_meta_types.h"
 #include "DNA_userdef_types.h"
 #include "DNA_gpencil_types.h"
 #include "DNA_windowmanager_types.h"
@@ -1066,7 +1067,7 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode,
                        case ANIMTYPE_DSPART:
                        {
                                ParticleSettings *part= (ParticleSettings*)ale->data;
-
+                               
                                if (ASUBCHANNEL_SEL_OK(ale)) {
                                        if (setting == ACHANNEL_SETTING_EXPAND) {
                                                ACHANNEL_SET_FLAG(part, mode, PART_DS_EXPAND);
@@ -1074,6 +1075,17 @@ static void setflag_anim_channels (bAnimContext *ac, short setting, short mode,
                                }
                        }
                                break;
+                       case ANIMTYPE_DSMBALL:
+                       {
+                               MetaBall *mb= (MetaBall *)ale->data;
+                               
+                               if (ASUBCHANNEL_SEL_OK(ale)) {
+                                       if (setting == ACHANNEL_SETTING_EXPAND) {
+                                               ACHANNEL_SET_FLAG(mb, mode, MB_DS_EXPAND);
+                                       }
+                               }
+                       }
+                               break;
                                
                        case ANIMTYPE_GROUP:
                        {
@@ -1688,6 +1700,13 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh
                        notifierFlags |= ND_ANIMCHAN_EDIT;
                }
                        break;
+               case ANIMTYPE_DSMBALL:
+               {
+                       MetaBall *mb= (MetaBall *)ale->data;
+                       mb->flag2 ^= MB_DS_EXPAND;
+                       notifierFlags |= ND_ANIMCHAN_EDIT;
+               }
+                       break;
                        
                case ANIMTYPE_GROUP: 
                {
index 4e479bd75d0941ecda5fcc687fe1a113fd05174c..4797c7946a423d248440d6904bb2dfc2a0d9ca09 100644 (file)
@@ -62,6 +62,7 @@
 #include "DNA_key_types.h"
 #include "DNA_material_types.h"
 #include "DNA_mesh_types.h"
+#include "DNA_meta_types.h"
 #include "DNA_object_types.h"
 #include "DNA_particle_types.h"
 #include "DNA_space_types.h"
@@ -1090,6 +1091,14 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
                        expanded= FILTER_CUR_OBJD(cu);
                }
                        break;
+               case OB_MBALL: /* ------- MetaBall ---------- */
+               {
+                       MetaBall *mb= (MetaBall *)ob->data;
+                       
+                       type= ANIMTYPE_DSMBALL;
+                       expanded= FILTER_MBALL_OBJD(mb);
+               }
+                       break;
        }
        
        /* special exception for drivers instead of action */
@@ -1273,12 +1282,25 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
                        }
                }
                        break;
+               case OB_MBALL: /* ------- MetaBall ---------- */
+               {
+                       MetaBall *mb= (MetaBall *)ob->data;
+                       
+                       if ((ads->filterflag & ADS_FILTER_NOMBA) == 0) {
+                               ANIMDATA_FILTER_CASES(mb,
+                                       { /* AnimData blocks - do nothing... */ },
+                                       obdata_ok= 1;,
+                                       obdata_ok= 1;,
+                                       obdata_ok= 1;)
+                       }
+               }
+                       break;
        }
        if (obdata_ok) 
                items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
 
        /* particles */
-       if(ob->particlesystem.first && !(ads->filterflag & ADS_FILTER_NOPART))
+       if (ob->particlesystem.first && !(ads->filterflag & ADS_FILTER_NOPART))
                items += animdata_filter_dopesheet_particles(anim_data, ads, base, filter_mode);
        
        /* return the number of items added to the list */
@@ -1595,6 +1617,23 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
                                                        dataOk= !(ads->filterflag & ADS_FILTER_NOCUR);)
                                        }
                                                break;
+                                       case OB_MBALL: /* ------- MetaBall ---------- */
+                                       {
+                                               MetaBall *mb= (MetaBall *)ob->data;
+                                               dataOk= 0;
+                                               ANIMDATA_FILTER_CASES(mb, 
+                                                       if ((ads->filterflag & ADS_FILTER_NOMBA)==0) {
+                                                               /* for the special AnimData blocks only case, we only need to add
+                                                                * the block if it is valid... then other cases just get skipped (hence ok=0)
+                                                                */
+                                                               ANIMDATA_ADD_ANIMDATA(mb);
+                                                               dataOk=0;
+                                                       },
+                                                       dataOk= !(ads->filterflag & ADS_FILTER_NOMBA);, 
+                                                       dataOk= !(ads->filterflag & ADS_FILTER_NOMBA);, 
+                                                       dataOk= !(ads->filterflag & ADS_FILTER_NOMBA);)
+                                       }
+                                               break;
                                        default: /* --- other --- */
                                                dataOk= 0;
                                                break;
@@ -1671,6 +1710,12 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
                                                dataOk= ANIMDATA_HAS_KEYS(cu);  
                                        }
                                                break;
+                                       case OB_MBALL: /* -------- Metas ---------- */
+                                       {
+                                               MetaBall *mb= (MetaBall *)ob->data;
+                                               dataOk= ANIMDATA_HAS_KEYS(mb);  
+                                       }
+                                               break;
                                        default: /* --- other --- */
                                                dataOk= 0;
                                                break;
index 8f7c0ceeab6be6b10210aefbb005fb285124c2f6..0786d0f9be0567559916abdc4c2fd6704fe13cdb 100644 (file)
@@ -131,6 +131,7 @@ typedef enum eAnim_ChannelType {
        ANIMTYPE_DSSKEY,
        ANIMTYPE_DSWOR,
        ANIMTYPE_DSPART,
+       ANIMTYPE_DSMBALL,
        
        ANIMTYPE_SHAPEKEY,              // XXX probably can become depreceated???
        
@@ -196,6 +197,7 @@ typedef enum eAnimFilter_Flags {
 #define FILTER_CAM_OBJD(ca) ((ca->flag & CAM_DS_EXPAND))
 #define FILTER_CUR_OBJD(cu) ((cu->flag & CU_DS_EXPAND))
 #define FILTER_PART_OBJD(part) ((part->flag & PART_DS_EXPAND))
+#define FILTER_MBALL_OBJD(mb) ((mb->flag2 & MB_DS_EXPAND))
        /* 'Sub-object/Action' channels (flags stored in Action) */
 #define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED))
 #define EXPANDED_ACTC(actc) ((actc->flag & ACT_COLLAPSED)==0)
index 216ff3993dde69613d431958bd5ec866ca951b62..6e86748adaeff74209c27cd7f3f35498bea2009d 100644 (file)
@@ -60,6 +60,7 @@
 #include "DNA_key_types.h"
 #include "DNA_lamp_types.h"
 #include "DNA_material_types.h"
+#include "DNA_meta_types.h"
 #include "DNA_userdef_types.h"
 #include "DNA_gpencil_types.h"
 #include "DNA_windowmanager_types.h"
@@ -653,6 +654,22 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                                        strcpy(name, part->id.name+2);
                                }
                                        break;
+                               case ANIMTYPE_DSMBALL: /* metaball (dopesheet) expand widget */
+                               {
+                                       MetaBall *mb = (MetaBall *)ale->data;
+                                       
+                                       group = 4;
+                                       indent = 1;
+                                       special = ICON_META_DATA;
+                                       
+                                       if (FILTER_MBALL_OBJD(mb))
+                                               expand = ICON_TRIA_DOWN;
+                                       else
+                                               expand = ICON_TRIA_RIGHT;
+                                       
+                                       strcpy(name, mb->id.name+2);
+                               }
+                                       break;
                                        
                                
                                case ANIMTYPE_GROUP: /* action group */
index b3c3cbaca18879e439953ce6edc26af318d8e655..d3929a22342cbca1c4890e271413181a42ece9be 100644 (file)
@@ -386,6 +386,7 @@ void action_header_buttons(const bContext *C, ARegion *ar)
                                uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Lamps");
                                uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA,       (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Cameras");
                                uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA,        (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Curves");
+                               uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display MetaBalls");
                                uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA,    (short)(xco+=XIC),yco,XIC,YIC, &(saction->ads.filterflag), 0, 0, 0, 0, "Display Particles");
                        uiBlockEndAlign(block);
                        xco += 30;
index 105ecf23c3e336014eef5bbac32a59db8c05b83a..f6915c4db0150cef8a8453cc9b872095b948a09b 100644 (file)
@@ -51,6 +51,7 @@
 #include "DNA_key_types.h"
 #include "DNA_lamp_types.h"
 #include "DNA_material_types.h"
+#include "DNA_meta_types.h"
 #include "DNA_object_types.h"
 #include "DNA_particle_types.h"
 #include "DNA_scene_types.h"
@@ -1158,6 +1159,22 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
                                        strcpy(name, part->id.name+2);
                                }
                                        break;
+                               case ANIMTYPE_DSMBALL: /* metaball (dopesheet) expand widget */
+                               {
+                                       MetaBall *mb = (MetaBall *)ale->data;
+                                       
+                                       group = 4;
+                                       indent = 1;
+                                       special = ICON_META_DATA;
+                                       
+                                       if (FILTER_MBALL_OBJD(mb))
+                                               expand = ICON_TRIA_DOWN;
+                                       else
+                                               expand = ICON_TRIA_RIGHT;
+                                       
+                                       strcpy(name, mb->id.name+2);
+                               }
+                                       break;
                                
                                
                                case ANIMTYPE_GROUP: /* action group */
index 989f1f8e0cc3608576e8c2062ac8e36d699f9c24..2c9017db6494aa136adac66ffb2ddb7c0784487d 100644 (file)
@@ -310,13 +310,14 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
                        uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Lamps");
                        uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA,       (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Cameras");
                        uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA,        (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Curves");
+                       uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display MetaBalls");
                        uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA,    (short)(xco+=XIC),yco,XIC,YIC, &(sipo->ads->filterflag), 0, 0, 0, 0, "Display Particles");
                uiBlockEndAlign(block);
                xco += 30;
        }
        else {
                // XXX this case shouldn't happen at all... for now, just pad out same amount of space
-               xco += 9*XIC + 30;
+               xco += 10*XIC + 30;
        }
        
        /* auto-snap selector */
index 98dacc8ef5b74fc14cdb2b313d0027e80b318d7e..ab918519ec07c6336561d2a178177bf1b56a435d 100644 (file)
@@ -45,6 +45,7 @@
 #include "DNA_key_types.h"
 #include "DNA_lamp_types.h"
 #include "DNA_material_types.h"
+#include "DNA_meta_types.h"
 #include "DNA_userdef_types.h"
 #include "DNA_windowmanager_types.h"
 #include "DNA_world_types.h"
@@ -320,6 +321,22 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho
                        notifierFlags |= ND_ANIMCHAN_EDIT;
                }
                        break;
+               case ANIMTYPE_DSMBALL:
+               {
+                       MetaBall *mb= (MetaBall *)ale->data;
+                       AnimData *adt= ale->adt;
+                       
+                       if ( (adt) && (x >= (NLACHANNEL_NAMEWIDTH-NLACHANNEL_BUTTON_WIDTH)) ) {
+                               /* toggle mute */
+                               adt->flag ^= ADT_NLA_EVAL_OFF;
+                       } 
+                       else {
+                               /* toggle expand */
+                               mb->flag2 ^= MB_DS_EXPAND;
+                       }
+                       notifierFlags |= ND_ANIMCHAN_EDIT;
+               }
+                       break;
                        
                case ANIMTYPE_NLATRACK:
                {
index 3feefcc11ab024b9883a5162b7bc32acb6f5067c..a7a854a727755814ec1c5166cca33bd5e25462ce 100644 (file)
@@ -46,6 +46,7 @@
 #include "DNA_key_types.h"
 #include "DNA_lamp_types.h"
 #include "DNA_material_types.h"
+#include "DNA_meta_types.h"
 #include "DNA_particle_types.h"
 #include "DNA_userdef_types.h"
 #include "DNA_windowmanager_types.h"
@@ -908,6 +909,31 @@ void draw_nla_channel_list (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
                                        strcpy(name, part->id.name+2);
                                }
                                        break;
+                               case ANIMTYPE_DSMBALL: /* metaball (dopesheet) expand widget */
+                               {
+                                       MetaBall *mb = (MetaBall *)ale->data;
+                                       AnimData *adt= ale->adt;
+                                       
+                                       group = 4;
+                                       indent = 1;
+                                       special = ICON_META_DATA;
+                                       
+                                       if (FILTER_MBALL_OBJD(mb))
+                                               expand = ICON_TRIA_DOWN;
+                                       else
+                                               expand = ICON_TRIA_RIGHT;
+                                               
+                                       /* NLA evaluation on/off button */
+                                       if (adt) {
+                                               if (adt->flag & ADT_NLA_EVAL_OFF)
+                                                       mute = ICON_MUTE_IPO_ON;
+                                               else    
+                                                       mute = ICON_MUTE_IPO_OFF;
+                                       }
+                                       
+                                       strcpy(name, mb->id.name+2);
+                               }
+                                       break;
                                
                                case ANIMTYPE_NLATRACK: /* NLA Track */
                                {
index 20343adef037c8e868223b76d6a797c1d7c71fc3..04c2db08bda94f23ed16221a19f1f6cfc6bbeea9 100644 (file)
@@ -261,13 +261,14 @@ void nla_header_buttons(const bContext *C, ARegion *ar)
                        uiDefIconButBitI(block, TOGN, ADS_FILTER_NOLAM, B_REDR, ICON_LAMP_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Lamps");
                        uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCAM, B_REDR, ICON_CAMERA_DATA,       (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Cameras");
                        uiDefIconButBitI(block, TOGN, ADS_FILTER_NOCUR, B_REDR, ICON_CURVE_DATA,        (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Curves");
+                       uiDefIconButBitI(block, TOGN, ADS_FILTER_NOMBA, B_REDR, ICON_META_DATA, (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display MetaBalls");
                        uiDefIconButBitI(block, TOGN, ADS_FILTER_NOPART, B_REDR, ICON_PARTICLE_DATA,    (short)(xco+=XIC),yco,XIC,YIC, &(snla->ads->filterflag), 0, 0, 0, 0, "Display Particles");
                uiBlockEndAlign(block);
                xco += 15;
        }
        else {
                // XXX this case shouldn't happen at all... for now, just pad out same amount of space
-               xco += 7*XIC + 15;
+               xco += 10*XIC + 15;
        }
        xco += (XIC + 8);
        
index 0c6c04273e35098e1a4d90cef9fa749e90ce6678..6f097ea38826c73b4b613227b492f77dea097c6c 100644 (file)
@@ -313,6 +313,7 @@ typedef enum DOPESHEET_FILTERFLAG {
        ADS_FILTER_NOWOR                        = (1<<14),
        ADS_FILTER_NOSCE                        = (1<<15),
        ADS_FILTER_NOPART                       = (1<<16),
+       ADS_FILTER_NOMBA                        = (1<<17),
        
                /* NLA-specific filters */
        ADS_FILTER_NLA_NOACT            = (1<<20),      /* if the AnimData block has no NLA data, don't include to just show Action-line */
index 897368fd5dfc40ae11aea747f9d82cf639333965..8b61405b851c86310b15783c2fd9f199d5eb68ff 100644 (file)
@@ -35,6 +35,7 @@
 #include "DNA_ID.h"
 
 struct BoundBox;
+struct AnimData;
 struct Ipo;
 struct Material;
 
@@ -62,18 +63,20 @@ typedef struct MetaElem {
 
 typedef struct MetaBall {
        ID id;
+       struct AnimData *adt;
        
        struct BoundBox *bb;
 
        ListBase elems;
        ListBase disp;
        ListBase *editelems;            /* not saved in files, note we use pointer for editmode check */
-       struct Ipo *ipo;
+       struct Ipo *ipo;                        // XXX... depreceated (old animation system)
 
        /* material of the mother ball will define the material used of all others */
        struct Material **mat; 
 
-       short flag, totcol;
+       char flag, flag2;                       /* flag is enum for updates, flag2 is bitflags for settings */
+       short totcol;
        int texflag; /* used to store MB_AUTOSPACE */
        
        /* texture space, copied as one block in editobject.c */
@@ -104,6 +107,10 @@ typedef struct MetaBall {
 #define MB_UPDATE_FAST         2
 #define MB_UPDATE_NEVER                3
 
+/* mb->flag2 */
+#define MB_DS_EXPAND   (1<<0)
+
+
 /* ml->type */
 #define MB_BALL                0
 #define MB_TUBEX       1 /* depercated */
index 39e72c34adf60524f6133d2e93241d179e22c381..422e1b07ed7d922b52f9fd94a3505d7a8a7d5616 100644 (file)
@@ -147,7 +147,7 @@ typedef struct Sequence {
 
        Strip *strip;
 
-       struct Ipo *ipo;
+       struct Ipo *ipo;        // xxx depreceated... old animation system
        struct Scene *scene;
        struct anim *anim;
        float facf0, facf1;
index df26e6b8121cdbf1a11f31b4575443fb6ec97cf6..17193f313f589a80cdd5650a4c6efd9bbf333f45 100644 (file)
@@ -185,6 +185,9 @@ void rna_def_metaball(BlenderRNA *brna)
 
        /* materials, textures */
        rna_def_texmat_common(srna, "rna_Meta_texspace_editable");
+       
+       /* anim */
+       rna_def_animdata_common(srna);
 }
 
 void RNA_def_meta(BlenderRNA *brna)