#if 0 use of Object.nlastrips, there is no way to add or remove these from blender so better not run.

This commit is contained in:
Campbell Barton
2011-12-04 17:24:34 +00:00
parent 3eaf5e93fd
commit f4eb0f507f
6 changed files with 72 additions and 65 deletions

View File

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

View File

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

View File

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

View File

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

View File

@@ -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]);
}

View File

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