diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-04 21:24:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-04 21:24:34 +0400 |
commit | f4eb0f507f96eedae9f110aaaf46b5ef4ab40b6b (patch) | |
tree | 90ce1f1e2af8c48db1736a756dbaf4c8b83276ee /source | |
parent | 3eaf5e93fd6625fdcca7fd81e6d5ff202ef8b726 (diff) |
`#if 0` use of Object.nlastrips, there is no way to add or remove these from blender so better not run.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_effect.h | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/armature.c | 9 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/effect.c | 37 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/group.c | 22 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 18 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 46 |
6 files changed, 72 insertions, 65 deletions
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index 7f4e809718c..3ebd57dde39 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -109,15 +109,10 @@ typedef struct EffectorCache { int flag; } EffectorCache; -void free_effect(struct Effect *eff); -void free_effects(struct ListBase *lb); struct Effect *copy_effect(struct Effect *eff); void copy_effects(struct ListBase *lbn, struct ListBase *lb); void deselectall_eff(struct Object *ob); -struct PartEff *give_parteff(struct Object *ob); - - void free_partdeflect(struct PartDeflect *pd); struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights); void pdEndEffectors(struct ListBase **effectors); diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 2157bd5999b..68d2cf940af 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -2120,6 +2120,8 @@ void pchan_calc_mat(bPoseChannel *pchan) pchan_to_mat4(pchan, pchan->chan_mat); } +#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */ + /* NLA strip modifiers */ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseChannel *pchan) { @@ -2242,6 +2244,8 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha } } +#endif + /* calculate tail of posechannel */ void where_is_pose_bone_tail(bPoseChannel *pchan) { @@ -2351,9 +2355,12 @@ void where_is_pose_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float cti } if(do_extra) { + +#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */ /* do NLA strip modifiers - i.e. curve follow */ do_strip_modifiers(scene, ob, bone, pchan); - +#endif + /* Do constraints */ if (pchan->constraints.first) { bConstraintOb *cob; diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 7b58c0bc00b..dcb8533d7a1 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -154,43 +154,6 @@ typedef struct VeNoCo { /* ***************** PARTICLES ***************** */ -/* deprecated, only keep this for readfile.c */ -PartEff *give_parteff(Object *ob) -{ - PartEff *paf; - - paf= ob->effect.first; - while(paf) { - if(paf->type==EFF_PARTICLE) return paf; - paf= paf->next; - } - return NULL; -} - -void free_effect(Effect *eff) -{ - PartEff *paf; - - if(eff->type==EFF_PARTICLE) { - paf= (PartEff *)eff; - if(paf->keys) MEM_freeN(paf->keys); - } - MEM_freeN(eff); -} - - -void free_effects(ListBase *lb) -{ - Effect *eff; - - eff= lb->first; - while(eff) { - BLI_remlink(lb, eff); - free_effect(eff); - eff= lb->first; - } -} - /* -------------------------- Effectors ------------------ */ void free_partdeflect(PartDeflect *pd) { diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index d0f09857781..7ac395212ab 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -108,16 +108,19 @@ void unlink_group(Group *group) } for(ob= bmain->object.first; ob; ob= ob->id.next) { - bActionStrip *strip; if(ob->dup_group==group) { ob->dup_group= NULL; - - /* duplicator strips use a group object, we remove it */ - for(strip= ob->nlastrips.first; strip; strip= strip->next) { - if(strip->object) - strip->object= NULL; +#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */ + { + bActionStrip *strip; + /* duplicator strips use a group object, we remove it */ + for(strip= ob->nlastrips.first; strip; strip= strip->next) { + if(strip->object) + strip->object= NULL; + } } +#endif } for(psys=ob->particlesystem.first; psys; psys=psys->next){ @@ -275,13 +278,14 @@ void group_tag_recalc(Group *group) } } -int group_is_animated(Object *parent, Group *group) +int group_is_animated(Object *UNUSED(parent), Group *group) { GroupObject *go; - - // XXX: old animsys depreceated... + +#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */ if(parent->nlastrips.first) return 1; +#endif for(go= group->gobject.first; go; go= go->next) if(go->ob && go->ob->proxy) diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 7a4780eb984..cb1c7dbec5c 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1319,19 +1319,23 @@ static void lib_indirect_test_id(ID *id, Library *lib) if(GS(id->name)==ID_OB) { Object *ob= (Object *)id; - bActionStrip *strip; Mesh *me; int a; - + +#if 0 /* XXX OLD ANIMSYS, NLASTRIPS ARE NO LONGER USED */ // XXX old animation system! -------------------------------------- - for (strip=ob->nlastrips.first; strip; strip=strip->next){ - LIBTAG(strip->object); - LIBTAG(strip->act); - LIBTAG(strip->ipo); + { + bActionStrip *strip; + for (strip=ob->nlastrips.first; strip; strip=strip->next){ + LIBTAG(strip->object); + LIBTAG(strip->act); + LIBTAG(strip->ipo); + } } // XXX: new animation system needs something like this? - +#endif + for(a=0; a<ob->totcol; a++) { LIBTAG(ob->mat[a]); } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index c72bc17cc1c..b5baeab5d5f 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -109,7 +109,7 @@ #include "BKE_context.h" #include "BKE_curve.h" #include "BKE_deform.h" -#include "BKE_effect.h" /* give_parteff */ +#include "BKE_effect.h" #include "BKE_fcurve.h" #include "BKE_global.h" // for G #include "BKE_group.h" @@ -7084,6 +7084,40 @@ static void do_versions_gpencil_2_50(Main *main, bScreen *screen) } } +/* deprecated, only keep this for readfile.c */ +static PartEff *do_version_give_parteff_245(Object *ob) +{ + PartEff *paf; + + paf= ob->effect.first; + while(paf) { + if(paf->type==EFF_PARTICLE) return paf; + paf= paf->next; + } + return NULL; +} +static void do_version_free_effect_245(Effect *eff) +{ + PartEff *paf; + + if(eff->type==EFF_PARTICLE) { + paf= (PartEff *)eff; + if(paf->keys) MEM_freeN(paf->keys); + } + MEM_freeN(eff); +} +static void do_version_free_effects_245(ListBase *lb) +{ + Effect *eff; + + eff= lb->first; + while(eff) { + BLI_remlink(lb, eff); + do_version_free_effect_245(eff); + eff= lb->first; + } +} + static void do_version_mtex_factor_2_50(MTex **mtex_array, short idtype) { MTex *mtex; @@ -7659,7 +7693,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) Object *ob = main->object.first; PartEff *paf; while (ob) { - paf = give_parteff(ob); + paf = do_version_give_parteff_245(ob); if (paf) { if (paf->staticstep == 0) { paf->staticstep= 5; @@ -8868,7 +8902,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } - paf = give_parteff(ob); + paf = do_version_give_parteff_245(ob); if (paf) { if(paf->disp == 0) paf->disp = 100; @@ -9876,7 +9910,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } /* convert old particles to new system */ - if((paf = give_parteff(ob))) { + if((paf = do_version_give_parteff_245(ob))) { ParticleSystem *psys; ModifierData *md; ParticleSystemModifierData *psmd; @@ -9989,7 +10023,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) part->type = PART_FLUID; } - free_effects(&ob->effect); + do_version_free_effects_245(&ob->effect); printf("Old particle system converted to new system.\n"); } @@ -13444,7 +13478,7 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob) expand_doit(fd, mainvar, ob->mat[a]); } - paf = give_parteff(ob); + paf = do_version_give_parteff_245(ob); if (paf && paf->group) expand_doit(fd, mainvar, paf->group); |