From 60015089364b4498b09054ee07112896fde5eeec Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 8 Feb 2010 21:23:17 +0000 Subject: 2.49 to 2.5 Animation Conversion Bugfixes: - World Animation was being ignored. Reported on BA - Particle/Sound/World animation handling were all missing break statements for some reason, which was corrupting path names. --- source/blender/blenkernel/intern/ipo.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/ipo.c') diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index d216cefe8f8..e5a8a3bd907 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -865,12 +865,15 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co case ID_SO: /* sound */ propname= sound_adrcodes_to_paths(adrcode, &dummy_index); + break; case ID_WO: /* world */ propname= world_adrcodes_to_paths(adrcode, &dummy_index); + break; case ID_PA: /* particle */ propname= particle_adrcodes_to_paths(adrcode, &dummy_index); + break; /* XXX problematic blocktypes */ case ID_CU: /* curve */ @@ -1800,18 +1803,36 @@ void do_versions_ipos_to_animato(Main *main) } } + /* worlds */ + for (id= main->world.first; id; id= id->next) { + World *wo= (World *)id; + + if (G.f & G_DEBUG) printf("\tconverting world %s \n", id->name+2); + + /* we're only interested in the IPO */ + if (wo->ipo) { + /* Add AnimData block */ + adt= BKE_id_add_animdata(id); + + /* Convert World data... */ + ipo_to_animdata(id, wo->ipo, NULL, NULL); + wo->ipo->id.us--; + wo->ipo= NULL; + } + } + /* sequence strips */ for(scene = main->scene.first; scene; scene = scene->id.next) { if(scene->ed && scene->ed->seqbasep) { Sequence * seq; - + for(seq = scene->ed->seqbasep->first; seq; seq = seq->next) { short adrcode = SEQ_FAC1; - + if (G.f & G_DEBUG) printf("\tconverting sequence strip %s \n", seq->name+2); - + if (!seq->ipo || !seq->ipo->curve.first) { seq->flag |= SEQ_USE_EFFECT_DEFAULT_FADE; -- cgit v1.2.3