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_screen.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_screen.c')
-rw-r--r--source/blender/makesrna/intern/rna_screen.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index b7279757455..a4ba6ec172b 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -42,6 +42,31 @@ EnumPropertyItem region_type_items[] = {
#ifdef RNA_RUNTIME
+#include "WM_api.h"
+#include "WM_types.h"
+
+static void rna_Screen_scene_set(PointerRNA *ptr, PointerRNA value)
+{
+ bScreen *sc= (bScreen*)ptr->data;
+
+ if(value.data == NULL)
+ return;
+
+ /* exception: can't set screens inside of area/region handers */
+ sc->newscene= value.data;
+}
+
+static void rna_Screen_scene_update(bContext *C, PointerRNA *ptr)
+{
+ bScreen *sc= (bScreen*)ptr->data;
+
+ /* exception: can't set screens inside of area/region handers */
+ if(sc->newscene) {
+ WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, sc->newscene);
+ sc->newscene= NULL;
+ }
+}
+
#else
static void rna_def_scrarea(BlenderRNA *brna)
@@ -94,6 +119,9 @@ static void rna_def_bscreen(BlenderRNA *brna)
prop= RNA_def_property(srna, "scene", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Scene", "Active scene to be edited in the screen.");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_Screen_scene_set", NULL);
+ RNA_def_property_update(prop, 0, "rna_Screen_scene_update");
prop= RNA_def_property(srna, "areas", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "areabase", NULL);