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:
authorMatt Ebb <matt@mke3.net>2009-12-14 02:51:41 +0300
committerMatt Ebb <matt@mke3.net>2009-12-14 02:51:41 +0300
commita4d52bd0fd180e2934ebed21a7d2aab84cc5b5a9 (patch)
tree0321ee1ae540ee49e9d60f04ca5cda23fee9cbac
parent3f612b6ea5b15b0a868f1472053378949722c88a (diff)
patch [#20342] Notifier patch for modifier rename and particle system rename
by 'ThatHaze'. thanks!
-rw-r--r--source/blender/editors/space_action/space_action.c18
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c5
-rw-r--r--source/blender/editors/space_graph/space_graph.c11
-rw-r--r--source/blender/editors/space_logic/space_logic.c7
-rw-r--r--source/blender/editors/space_nla/space_nla.c15
-rw-r--r--source/blender/editors/space_node/space_node.c7
-rw-r--r--source/blender/editors/space_outliner/outliner.c2
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c8
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c14
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c4
-rw-r--r--source/blender/makesrna/intern/rna_ID.c2
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c1
-rw-r--r--source/blender/makesrna/intern/rna_particle.c1
-rw-r--r--source/blender/windowmanager/WM_types.h26
14 files changed, 54 insertions, 67 deletions
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 0cbc2ce9078..08ed44a54f9 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -289,14 +289,15 @@ static void action_channel_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_KEYS:
ED_region_tag_redraw(ar);
break;
+ case ND_MODIFIER:
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
+ break;
}
break;
case NC_ID:
- switch(wmn->data) {
- case ND_ID_RENAME:
- ED_region_tag_redraw(ar);
- break;
- }
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
break;
default:
if(wmn->data==ND_KEYS)
@@ -339,11 +340,8 @@ static void action_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_ID:
- switch(wmn->data) {
- case ND_ID_RENAME:
- ED_region_tag_redraw(ar);
- break;
- }
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
break;
default:
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index f6b376f6e8e..160343cf940 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -271,6 +271,9 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
case ND_BONE_ACTIVE:
case ND_BONE_SELECT:
case ND_MODIFIER:
+ if(wmn->action == NA_RENAME)
+ ED_area_tag_redraw(sa);
+ break;
case ND_CONSTRAINT:
ED_area_tag_redraw(sa);
break;
@@ -311,7 +314,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
ED_area_tag_redraw(sa);
break;
case NC_ID:
- if(wmn->data == ND_ID_RENAME)
+ if(wmn->action == NA_RENAME)
ED_area_tag_redraw(sa);
break;
}
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index d77caa4c0e3..3023ec89258 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -398,6 +398,10 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
case ND_KEYS:
ED_region_tag_redraw(ar);
break;
+ case ND_MODIFIER:
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
+ break;
}
break;
case NC_NODE:
@@ -408,11 +412,8 @@ static void graph_region_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_ID:
- switch(wmn->data) {
- case ND_ID_RENAME:
- ED_region_tag_redraw(ar);
- break;
- }
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
break;
default:
if(wmn->data==ND_KEYS)
diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c
index ed8c7f2e4e7..c5b18d5b40e 100644
--- a/source/blender/editors/space_logic/space_logic.c
+++ b/source/blender/editors/space_logic/space_logic.c
@@ -218,11 +218,8 @@ static void logic_listener(ARegion *ar, wmNotifier *wmn)
case NC_OBJECT:
break;
case NC_ID:
- switch(wmn->data) {
- case ND_ID_RENAME:
- ED_region_tag_redraw(ar);
- break;
- }
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
break;
}
}
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 8aceb647fe2..a799e265b72 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -423,11 +423,8 @@ static void nla_main_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_ID:
- switch(wmn->data) {
- case ND_ID_RENAME:
- ED_region_tag_redraw(ar);
- break;
- }
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
break;
default:
if(wmn->data==ND_KEYS)
@@ -459,12 +456,10 @@ static void nla_channel_area_listener(ARegion *ar, wmNotifier *wmn)
}
break;
case NC_ID:
- switch(wmn->data) {
- case ND_ID_RENAME:
- ED_region_tag_redraw(ar);
- break;
- }
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
break;
+
default:
if(wmn->data==ND_KEYS)
ED_region_tag_redraw(ar);
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 64db1520ba1..dfdd4ea6657 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -315,11 +315,8 @@ static void node_region_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- switch(wmn->data) {
- case ND_ID_RENAME:
- ED_region_tag_redraw(ar);
- break;
- }
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
break;
}
}
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 750861ddace..f3485328c52 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -4747,7 +4747,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
case ID_SCE:
WM_event_add_notifier(C, NC_SCENE, NULL); break;
default:
- WM_event_add_notifier(C, NC_ID|ND_ID_RENAME, NULL); break;
+ WM_event_add_notifier(C, NC_ID|NA_RENAME, NULL); break;
}
/* Check the library target exists */
if (te->idcode == ID_LI) {
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 31de6839468..469fe148b97 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -133,6 +133,10 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
case ND_TRANSFORM:
ED_region_tag_redraw(ar);
break;
+ case ND_MODIFIER:
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
+ break;
}
case NC_GROUP:
/* all actions now, todo: check outliner view mode? */
@@ -148,9 +152,9 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- if(wmn->data == ND_ID_RENAME)
+ if(wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
- break;
+ break;
}
}
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 5be9fdee5a9..1e2fc1f59d3 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -242,11 +242,8 @@ static void sequencer_main_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- switch(wmn->data) {
- case ND_ID_RENAME:
- ED_region_tag_redraw(ar);
- break;
- }
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
break;
}
}
@@ -284,11 +281,8 @@ static void sequencer_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- switch(wmn->data) {
- case ND_ID_RENAME:
- ED_region_tag_redraw(ar);
- break;
- }
+ if(wmn->action == NA_RENAME)
+ ED_region_tag_redraw(ar);
break;
}
}
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index bd277f68513..e65cb98e665 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -518,7 +518,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- if(wmn->data == ND_ID_RENAME)
+ if(wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
}
@@ -644,7 +644,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_ID:
- if(wmn->data == ND_ID_RENAME)
+ if(wmn->action == NA_RENAME)
ED_region_tag_redraw(ar);
break;
}
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index ed73ddef3f5..32b6de40a03 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -356,7 +356,7 @@ static void rna_def_ID(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name.");
RNA_def_property_string_funcs(prop, "rna_ID_name_get", "rna_ID_name_length", "rna_ID_name_set");
RNA_def_property_string_maxlength(prop, sizeof(((ID*)NULL)->name)-2);
- RNA_def_property_update(prop, NC_ID|ND_ID_RENAME, NULL);
+ RNA_def_property_update(prop, NC_ID|NA_RENAME, NULL);
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "users", PROP_INT, PROP_UNSIGNED);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index aee2b048f6b..2754341810c 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -2016,6 +2016,7 @@ void RNA_def_modifier(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Modifier_name_set");
RNA_def_property_ui_text(prop, "Name", "Modifier name.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER|NA_RENAME, NULL);
RNA_def_struct_name_property(srna, prop);
/* enums */
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 4ff42bbb7c2..c5b1aafb1a3 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1904,6 +1904,7 @@ static void rna_def_particle_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "Particle system name.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER|NA_RENAME, NULL);
RNA_def_struct_name_property(srna, prop);
/* access to particle settings is redirected through functions */
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 160f9cccf6c..2a742b29d1c 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -218,10 +218,6 @@ typedef struct wmNotifier {
/* NC_NODE Nodes */
#define ND_NODE_SELECT (1<<16)
- /* NC_ID IDs */
-#define ND_ID_RENAME (1<<16)
-
-
/* NC_SPACE */
#define ND_SPACE_CONSOLE (1<<16) /* general redraw */
#define ND_SPACE_CONSOLE_REPORT (2<<16) /* update for reports, could specify type */
@@ -245,17 +241,17 @@ typedef struct wmNotifier {
#define NOTE_SUBTYPE 0x0000FF00
/* subtype scene mode */
-#define NS_MODE_OBJECT (1<<8)
-
-#define NS_EDITMODE_MESH (2<<8)
-#define NS_EDITMODE_CURVE (3<<8)
-#define NS_EDITMODE_SURFACE (4<<8)
-#define NS_EDITMODE_TEXT (5<<8)
-#define NS_EDITMODE_MBALL (6<<8)
-#define NS_EDITMODE_LATTICE (7<<8)
+#define NS_MODE_OBJECT (1<<8)
+
+#define NS_EDITMODE_MESH (2<<8)
+#define NS_EDITMODE_CURVE (3<<8)
+#define NS_EDITMODE_SURFACE (4<<8)
+#define NS_EDITMODE_TEXT (5<<8)
+#define NS_EDITMODE_MBALL (6<<8)
+#define NS_EDITMODE_LATTICE (7<<8)
#define NS_EDITMODE_ARMATURE (8<<8)
-#define NS_MODE_POSE (9<<8)
-#define NS_MODE_PARTICLE (10<<8)
+#define NS_MODE_POSE (9<<8)
+#define NS_MODE_PARTICLE (10<<8)
/* action classification */
@@ -264,7 +260,7 @@ typedef struct wmNotifier {
#define NA_EVALUATED 2
#define NA_ADDED 3
#define NA_REMOVED 4
-
+#define NA_RENAME 5
/* ************** Gesture Manager data ************** */