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_image.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_image.c')
-rw-r--r--source/blender/makesrna/intern/rna_image.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 44c55e821a9..e0d8a6950de 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -49,7 +49,7 @@ static EnumPropertyItem image_source_items[]= {
#include "IMB_imbuf_types.h"
-static void rna_Image_animated_update(bContext *C, PointerRNA *ptr)
+static void rna_Image_animated_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Image *ima= (Image*)ptr->data;
int nr;
@@ -74,13 +74,13 @@ static int rna_Image_dirty_get(PointerRNA *ptr)
return 0;
}
-static void rna_Image_source_update(bContext *C, PointerRNA *ptr)
+static void rna_Image_source_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Image *ima= ptr->id.data;
BKE_image_signal(ima, NULL, IMA_SIGNAL_SRC_CHANGE);
}
-static void rna_Image_fields_update(bContext *C, PointerRNA *ptr)
+static void rna_Image_fields_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Image *ima= ptr->id.data;
ImBuf *ibuf;
@@ -101,22 +101,21 @@ static void rna_Image_fields_update(bContext *C, PointerRNA *ptr)
BKE_image_release_ibuf(ima, lock);
}
-static void rna_Image_reload_update(bContext *C, PointerRNA *ptr)
+static void rna_Image_reload_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Image *ima= ptr->id.data;
BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
printf("reload %p\n", ima);
}
-static void rna_Image_generated_update(bContext *C, PointerRNA *ptr)
+static void rna_Image_generated_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Image *ima= ptr->id.data;
BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE);
}
-static void rna_ImageUser_update(bContext *C, PointerRNA *ptr)
+static void rna_ImageUser_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- Scene *scene= CTX_data_scene(C);
ImageUser *iuser= ptr->data;
BKE_image_user_calc_imanr(iuser, scene->r.cfra, 0);