From 07904712e8943b5845df9559093018c8473f72f3 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 8 Dec 2009 17:23:48 +0000 Subject: RNA: * Property update functions no longer get context, instead they get only Main and Scene. The RNA api was intended to be as context-less as possible, since it doesn't really matter who is changing the property, everything that uses the property should be updated. * There's still one exception case that use it now, screen operations still depend on context too much. It also revealed a few places using context where they shouldn't. * Ideally Scene shouldn't be passed, but much of Blender still depends on it, should be dropped when we try to support multiple scene editing. Change was planned for a while, but need this now to be able to call update without a context pointer. --- source/blender/makesrna/intern/rna_sound.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_sound.c') diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c index 38e4d850c68..7fc209bfc5f 100644 --- a/source/blender/makesrna/intern/rna_sound.c +++ b/source/blender/makesrna/intern/rna_sound.c @@ -37,9 +37,9 @@ #include "BKE_sound.h" #include "BKE_context.h" -static void rna_Sound_filename_update(bContext *C, PointerRNA *ptr) +static void rna_Sound_filename_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - sound_load(CTX_data_main(C), (bSound*)ptr->data); + sound_load(bmain, (bSound*)ptr->data); } static int rna_Sound_caching_get(PointerRNA *ptr) -- cgit v1.2.3