diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-08 20:23:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-12-08 20:23:48 +0300 |
commit | 07904712e8943b5845df9559093018c8473f72f3 (patch) | |
tree | 03cdc6ea24ac87a2ee2a3c1a7299874040675489 /source/blender/makesrna/intern/rna_smoke.c | |
parent | ee74e720a82b7a1fb5f732cd8ceacbb26fa7e0d3 (diff) |
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_smoke.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_smoke.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index e302ea90a8a..11b1e80865e 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -49,33 +49,33 @@ #include "ED_object.h" -static void rna_Smoke_update(bContext *C, PointerRNA *ptr) +static void rna_Smoke_update(Main *bmain, Scene *scene, PointerRNA *ptr) { DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA); } -static void rna_Smoke_dependency_update(bContext *C, PointerRNA *ptr) +static void rna_Smoke_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - rna_Smoke_update(C, ptr); - DAG_scene_sort(CTX_data_scene(C)); + rna_Smoke_update(bmain, scene, ptr); + DAG_scene_sort(scene); } -static void rna_Smoke_reset(bContext *C, PointerRNA *ptr) +static void rna_Smoke_reset(Main *bmain, Scene *scene, PointerRNA *ptr) { SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data; smokeModifier_reset(settings->smd); - rna_Smoke_update(C, ptr); + rna_Smoke_update(bmain, scene, ptr); } -static void rna_Smoke_reset_dependancy(bContext *C, PointerRNA *ptr) +static void rna_Smoke_reset_dependancy(Main *bmain, Scene *scene, PointerRNA *ptr) { SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data; smokeModifier_reset(settings->smd); - rna_Smoke_dependency_update(C, ptr); + rna_Smoke_dependency_update(bmain, scene, ptr); } static char *rna_SmokeDomainSettings_path(PointerRNA *ptr) |