Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-12-04 21:24:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-04 21:24:34 +0400
commitf4eb0f507f96eedae9f110aaaf46b5ef4ab40b6b (patch)
tree90ce1f1e2af8c48db1736a756dbaf4c8b83276ee /source/blender/blenloader
parent3eaf5e93fd6625fdcca7fd81e6d5ff202ef8b726 (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/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c46
1 files changed, 40 insertions, 6 deletions
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);