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-09-05 00:51:09 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-09-05 00:51:09 +0400
commit7df35db1b1364dcd81dd8247ad3707d40a78fd59 (patch)
treefb967409fddbb02ee70fbdfa1e404fae115a312e /source/blender/windowmanager
parent5342f7930fb26855b92f337ace45f2ee51153957 (diff)
2.5
Notifiers --------- Various fixes for wrong use of notifiers, and some new notifiers to make things a bit more clear and consistent, with two notable changes: * Geometry changes are now done with NC_GEOM, rather than NC_OBJECT|ND_GEOM_, so an object does need to be available. * Space data now use NC_SPACE|ND_SPACE_*, instead of data notifiers or even NC_WINDOW in some cases. Note that NC_SPACE should only be used for notifying about changes in space data, we don't want to go back to allqueue(REDRAW..). Depsgraph --------- The dependency graph now has a different flush call: DAG_object_flush_update(scene, ob, flag) is replaced by: DAG_id_flush_update(id, flag) It still works basically the same, one difference is that it now also accepts object data (e.g. Mesh), again to avoid requiring an Object to be available. Other ID types will simply do nothing at the moment. Docs ---- I made some guidelines for how/when to do which kinds of updates and notifiers. I can't specify totally exact how to make these decisions, but these are basically the guidelines I use. So, new and updated docs are here: http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdates http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/WM_types.h51
-rw-r--r--source/blender/windowmanager/intern/wm.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
3 files changed, 35 insertions, 22 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 5687cb565d1..806f5409b0a 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -130,11 +130,10 @@ typedef struct wmNotifier {
#define NC_BRUSH (11<<24)
#define NC_TEXT (12<<24)
#define NC_WORLD (13<<24)
-#define NC_FILE (14<<24)
-#define NC_ANIMATION (15<<24)
-#define NC_CONSOLE (16<<24)
-#define NC_NODE (17<<24)
-#define NC_INFO (18<<24)
+#define NC_ANIMATION (14<<24)
+#define NC_SPACE (15<<24)
+#define NC_NODE (15<<24)
+#define NC_GEOM (16<<24)
/* data type, 256 entries is enough, it can overlap */
#define NOTE_DATA 0x00FF0000
@@ -172,13 +171,12 @@ typedef struct wmNotifier {
#define ND_POSE (18<<16)
#define ND_BONE_ACTIVE (19<<16)
#define ND_BONE_SELECT (20<<16)
-#define ND_GEOM_SELECT (21<<16)
-#define ND_DRAW (22<<16)
-#define ND_MODIFIER (23<<16)
-#define ND_KEYS (24<<16)
-#define ND_GEOM_DATA (25<<16)
-#define ND_CONSTRAINT (26<<16)
-#define ND_PARTICLE (27<<16)
+#define ND_DRAW (21<<16)
+#define ND_MODIFIER (22<<16) /* modifiers edited */
+#define ND_KEYS (23<<16)
+#define ND_CONSTRAINT (24<<16) /* constraints edited */
+#define ND_PARTICLE_DATA (25<<16) /* particles edited */
+#define ND_PARTICLE_SELECT (26<<16) /* particles selecting change */
/* NC_MATERIAL Material */
#define ND_SHADING (30<<16)
@@ -193,10 +191,6 @@ typedef struct wmNotifier {
#define ND_CURSOR (50<<16)
#define ND_DISPLAY (51<<16)
- /* NC_FILE Filebrowser */
-#define ND_PARAMS (60<<16)
-#define ND_FILELIST (61<<16)
-
/* NC_ANIMATION Animato */
#define ND_KEYFRAME_SELECT (70<<16)
#define ND_KEYFRAME_EDIT (71<<16)
@@ -207,9 +201,28 @@ typedef struct wmNotifier {
#define ND_NLA_EDIT (76<<16)
#define ND_NLA_ACTCHANGE (77<<16)
- /* console */
-#define ND_CONSOLE (78<<16) /* general redraw */
-#define ND_CONSOLE_REPORT (79<<16) /* update for reports, could spesify type */
+ /* NC_GEOM Geometry */
+ /* Mesh, Curve, MetaBall, Armature, .. */
+#define ND_SELECT (80<<16)
+#define ND_DATA (81<<16)
+
+ /* NC_SPACE */
+#define ND_SPACE_CONSOLE (1<<16) /* general redraw */
+#define ND_SPACE_CONSOLE_REPORT (2<<16) /* update for reports, could specify type */
+#define ND_SPACE_INFO (2<<16)
+#define ND_SPACE_IMAGE (3<<16)
+#define ND_SPACE_FILE_PARAMS (4<<16)
+#define ND_SPACE_FILE_LIST (5<<16)
+#define ND_SPACE_NODE (6<<16)
+#define ND_SPACE_OUTLINER (7<<16)
+#define ND_SPACE_VIEW3D (8<<16)
+#define ND_SPACE_PROPERTIES (9<<16)
+#define ND_SPACE_TEXT (10<<16)
+#define ND_SPACE_TIME (11<<16)
+#define ND_SPACE_GRAPH (12<<16)
+#define ND_SPACE_DOPESHEET (13<<16)
+#define ND_SPACE_NLA (14<<16)
+#define ND_SPACE_SEQUENCER (15<<16)
/* subtype, 256 entries too */
#define NOTE_SUBTYPE 0x0000FF00
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index fecd5c20a15..38cf39c2081 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -108,7 +108,7 @@ void wm_operator_register(bContext *C, wmOperator *op)
MEM_freeN(buf);
/* so the console is redrawn */
- WM_event_add_notifier(C, NC_CONSOLE|ND_CONSOLE_REPORT, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CONSOLE_REPORT, NULL);
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 717c2d25261..c2c90f055b0 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -177,9 +177,9 @@ void wm_event_do_notifiers(bContext *C)
do_anim= 1;
}
}
- if(note->category == NC_SCENE || note->category == NC_OBJECT) {
+ if(ELEM3(note->category, NC_SCENE, NC_OBJECT, NC_GEOM)) {
ED_info_stats_clear(CTX_data_scene(C));
- WM_event_add_notifier(C, NC_INFO, NULL);
+ WM_event_add_notifier(C, NC_SPACE|ND_SPACE_INFO, NULL);
}
}
if(do_anim) {