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-06-30 23:10:14 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-06-30 23:10:14 +0400
commit80ee09bb9a03a58019b2054d7e0d280658858656 (patch)
treed7b00ff876776a19163b73aa7fe0c534ec986b92 /source/blender/makesrna/intern/rna_image.c
parent538da84de0b0944d646d9b589e5b29e93bbd20bb (diff)
RNA
* Add Image.dirty boolean. * Added Window struct, with editable Window.screen. * Make Screen.scene editable.
Diffstat (limited to 'source/blender/makesrna/intern/rna_image.c')
-rw-r--r--source/blender/makesrna/intern/rna_image.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 4a6fdf5a734..c74e46c17da 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -39,6 +39,8 @@
#ifdef RNA_RUNTIME
+#include "IMB_imbuf_types.h"
+
static void rna_Image_animated_update(bContext *C, PointerRNA *ptr)
{
Image *ima= (Image*)ptr->data;
@@ -52,6 +54,18 @@ static void rna_Image_animated_update(bContext *C, PointerRNA *ptr)
}
}
+static int rna_Image_dirty_get(PointerRNA *ptr)
+{
+ Image *ima= (Image*)ptr->data;
+ ImBuf *ibuf;
+
+ for(ibuf=ima->ibufs.first; ibuf; ibuf=ibuf->next)
+ if(ibuf->userflags & IB_BITMAPDIRTY)
+ return 1;
+
+ return 0;
+}
+
#else
static void rna_def_imageuser(BlenderRNA *brna)
@@ -174,6 +188,11 @@ static void rna_def_image(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha.");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
+ prop= RNA_def_property(srna, "dirty", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_funcs(prop, "rna_Image_dirty_get", NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Dirty", "Image has changed and is not saved.");
+
/* generated image (image_generated_change_cb) */
prop= RNA_def_property(srna, "generated_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "gen_type");