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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-08 20:23:48 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-08 20:23:48 +0300
commit07904712e8943b5845df9559093018c8473f72f3 (patch)
tree03cdc6ea24ac87a2ee2a3c1a7299874040675489 /source/blender/makesrna/intern/rna_lamp.c
parentee74e720a82b7a1fb5f732cd8ceacbb26fa7e0d3 (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_lamp.c')
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index a518bd28d24..5112e68a008 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -100,28 +100,28 @@ static StructRNA* rna_Lamp_refine(struct PointerRNA *ptr)
}
}
-static void rna_Lamp_update(bContext *C, PointerRNA *ptr)
+static void rna_Lamp_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Lamp *la= ptr->id.data;
DAG_id_flush_update(&la->id, 0);
- WM_event_add_notifier(C, NC_LAMP|ND_LIGHTING, la);
+ WM_main_add_notifier(NC_LAMP|ND_LIGHTING, la);
}
-static void rna_Lamp_draw_update(bContext *C, PointerRNA *ptr)
+static void rna_Lamp_draw_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Lamp *la= ptr->id.data;
DAG_id_flush_update(&la->id, 0);
- WM_event_add_notifier(C, NC_LAMP|ND_LIGHTING_DRAW, la);
+ WM_main_add_notifier(NC_LAMP|ND_LIGHTING_DRAW, la);
}
-static void rna_Lamp_sky_update(bContext *C, PointerRNA *ptr)
+static void rna_Lamp_sky_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Lamp *la= ptr->id.data;
DAG_id_flush_update(&la->id, 0);
- WM_event_add_notifier(C, NC_LAMP|ND_SKY, la);
+ WM_main_add_notifier(NC_LAMP|ND_SKY, la);
}
#else