Hi Joerg, I did check why it was unused and in this case I thought it wasn't so important to keep, there are many areas in blender that will need refactoring if we allow multiple main's to be user visible at once - multiple blend files open at one time.
but I'm not especially fussed in this case either. reminds me we should deprecate G.sce soon :) On Sun, Oct 17, 2010 at 9:01 AM, Joerg Mueller <[email protected]> wrote: > Revision: 32536 > > http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32536 > Author: nexyon > Date: 2010-10-17 11:01:37 +0200 (Sun, 17 Oct 2010) > > Log Message: > ----------- > Reverting Cam's audio code changes from revision 32517. Part of it has been > reverted by Nathan already. Cam: next time please check, why a parameter is > unused before you remove it! > > Revision Links: > -------------- > > http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32517 > > Modified Paths: > -------------- > trunk/blender/source/blender/blenkernel/BKE_sound.h > trunk/blender/source/blender/blenkernel/intern/packedFile.c > trunk/blender/source/blender/blenkernel/intern/sound.c > trunk/blender/source/blender/blenloader/intern/readfile.c > trunk/blender/source/blender/editors/sound/sound_ops.c > trunk/blender/source/blender/makesrna/intern/rna_sound.c > > Modified: trunk/blender/source/blender/blenkernel/BKE_sound.h > =================================================================== > --- trunk/blender/source/blender/blenkernel/BKE_sound.h 2010-10-17 09:01:12 > UTC (rev 32535) > +++ trunk/blender/source/blender/blenkernel/BKE_sound.h 2010-10-17 09:01:37 > UTC (rev 32536) > @@ -62,7 +62,7 @@ > > void sound_delete_cache(struct bSound* sound); > > -void sound_load(struct bSound* sound); > +void sound_load(struct Main *main, struct bSound* sound); > > void sound_free(struct bSound* sound); > > > Modified: trunk/blender/source/blender/blenkernel/intern/packedFile.c > =================================================================== > --- trunk/blender/source/blender/blenkernel/intern/packedFile.c 2010-10-17 > 09:01:12 UTC (rev 32535) > +++ trunk/blender/source/blender/blenkernel/intern/packedFile.c 2010-10-17 > 09:01:37 UTC (rev 32536) > @@ -486,7 +486,7 @@ > freePackedFile(sound->packedfile); > sound->packedfile = 0; > > - sound_load(sound); > + sound_load(NULL, sound); > > ret_value = RET_OK; > } > > Modified: trunk/blender/source/blender/blenkernel/intern/sound.c > =================================================================== > --- trunk/blender/source/blender/blenkernel/intern/sound.c 2010-10-17 > 09:01:12 UTC (rev 32535) > +++ trunk/blender/source/blender/blenkernel/intern/sound.c 2010-10-17 > 09:01:37 UTC (rev 32536) > @@ -143,7 +143,7 @@ > BLI_strncpy(sound->name, filename, FILE_MAX); > // XXX unused currently sound->type = SOUND_TYPE_FILE; > > - sound_load(sound); > + sound_load(bmain, sound); > > if(!sound->playback_handle) > { > @@ -169,7 +169,7 @@ > sound->child_sound = source; > sound->type = SOUND_TYPE_BUFFER; > > - sound_load(sound); > + sound_load(CTX_data_main(C), sound); > > if(!sound->playback_handle) > { > @@ -195,7 +195,7 @@ > sound->end = end; > sound->type = SOUND_TYPE_LIMITER; > > - sound_load(sound); > + sound_load(CTX_data_main(C), sound); > > if(!sound->playback_handle) > { > @@ -236,7 +236,7 @@ > } > } > > -void sound_load(struct bSound* sound) > +void sound_load(struct Main *UNUSED(bmain), struct bSound* sound) > { > if(sound) > { > @@ -266,6 +266,7 @@ > if(sound->id.lib) > path = sound->id.lib->filepath; > else > + // XXX this should be fixed! > path = /*bmain ? bmain->name :*/ G.sce; > > BLI_path_abs(fullpath, path); > > Modified: trunk/blender/source/blender/blenloader/intern/readfile.c > =================================================================== > --- trunk/blender/source/blender/blenloader/intern/readfile.c 2010-10-17 > 09:01:12 UTC (rev 32535) > +++ trunk/blender/source/blender/blenloader/intern/readfile.c 2010-10-17 > 09:01:37 UTC (rev 32536) > @@ -5308,7 +5308,7 @@ > sound->id.flag -= LIB_NEEDLINK; > sound->ipo= newlibadr_us(fd, sound->id.lib, > sound->ipo); // XXX depreceated - old animation system > > - sound_load(sound); > + sound_load(main, sound); > > if(sound->cache) > sound_cache(sound, 1); > > Modified: trunk/blender/source/blender/editors/sound/sound_ops.c > =================================================================== > --- trunk/blender/source/blender/editors/sound/sound_ops.c 2010-10-17 > 09:01:12 UTC (rev 32535) > +++ trunk/blender/source/blender/editors/sound/sound_ops.c 2010-10-17 > 09:01:37 UTC (rev 32536) > @@ -180,7 +180,7 @@ > return OPERATOR_CANCELLED; > > sound->packedfile= newPackedFile(op->reports, sound->name); > - sound_load(sound); > + sound_load(CTX_data_main(C), sound); > > return OPERATOR_FINISHED; > } > > Modified: trunk/blender/source/blender/makesrna/intern/rna_sound.c > =================================================================== > --- trunk/blender/source/blender/makesrna/intern/rna_sound.c 2010-10-17 > 09:01:12 UTC (rev 32535) > +++ trunk/blender/source/blender/makesrna/intern/rna_sound.c 2010-10-17 > 09:01:37 UTC (rev 32536) > @@ -38,7 +38,7 @@ > > static void rna_Sound_filepath_update(Main *bmain, Scene *scene, PointerRNA > *ptr) > { > - sound_load((bSound*)ptr->data); > + sound_load(bmain, (bSound*)ptr->data); > } > > static int rna_Sound_caching_get(PointerRNA *ptr) > > > _______________________________________________ > Bf-blender-cvs mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-blender-cvs > -- - Campbell _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
