diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-09-18 12:37:47 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2010-09-18 12:37:47 +0400 |
commit | e2f439586498992969be5ac5631c51533545f3d4 (patch) | |
tree | c73c1292520a45c842d3d0976abcb04f8c2c9992 | |
parent | d81315e9d221b3fdd0dafedff58398226590f468 (diff) |
Fixed problems with outliner update in same cases caused by my previous commit.
This troubles were caused by "break" of ND_OBJECT case in outliner area listener,
so not all cases were handled.
Handle more data and actions in outline listener, but not refresh when it's
actually unneeded (there where problems with it without that "break" -- extra
refreshing could be made).
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/space_outliner.c | 14 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 1 |
6 files changed, 17 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index baf71cb21d6..f5d87df10a1 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -808,7 +808,7 @@ static int constraint_delete_exec (bContext *C, wmOperator *op) ED_object_constraint_update(ob); /* needed to set the flags on posebones correctly */ /* notifiers */ - WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, ob); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 1a46c32713e..5e11d3502c1 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -113,11 +113,21 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn) break; case ND_BONE_ACTIVE: case ND_BONE_SELECT: + case ND_PARENT: ED_region_tag_redraw(ar); break; + case ND_CONSTRAINT: + switch(wmn->action) { + case NA_ADDED: + case NA_REMOVED: + case NA_RENAME: + ED_region_tag_redraw(ar); + break; + } + break; case ND_MODIFIER: - if(wmn->action == NA_RENAME) - ED_region_tag_redraw(ar); + /* all modifier actions now */ + ED_region_tag_redraw(ar); break; } break; diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 071f6acaf3b..e4726f5e92c 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1919,6 +1919,7 @@ void RNA_def_constraint(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Constraint_name_set"); RNA_def_property_ui_text(prop, "Name", "Constraint name"); RNA_def_struct_name_property(srna, prop); + RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT|NA_RENAME, NULL); /* enums */ prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 5024c8d2c2e..aa12eb97e12 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2280,6 +2280,7 @@ void RNA_def_modifier(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Render); RNA_def_property_ui_text(prop, "Render", "Use modifier during rendering"); RNA_def_property_ui_icon(prop, ICON_SCENE, 0); + RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL); prop= RNA_def_property(srna, "show_in_editmode", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Editmode); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index d354e152fce..390529ccacc 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -216,6 +216,7 @@ static void rna_Object_dependency_update(Main *bmain, Scene *scene, PointerRNA * { DAG_id_flush_update(ptr->id.data, OB_RECALC_OB); DAG_scene_sort(bmain, scene); + WM_main_add_notifier(NC_OBJECT|ND_PARENT, ptr->id.data); } /* when changing the selection flag the scene needs updating */ diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index a732524ca03..c5e38926217 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -198,6 +198,7 @@ typedef struct wmNotifier { #define ND_CONSTRAINT (24<<16) #define ND_PARTICLE (25<<16) #define ND_POINTCACHE (26<<16) +#define ND_PARENT (27<<16) /* NC_MATERIAL Material */ #define ND_SHADING (30<<16) |