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:
authorNathan Letwory <nathan@letworyinteractive.com>2010-09-22 17:42:20 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2010-09-22 17:42:20 +0400
commit0bbc2cf88248485151b9dbaa90425dc3e2b1f4c4 (patch)
treef798070c9771484aa8e29fdde4d1ec4b154516d6 /source/blender/editors/space_outliner
parentd135e63705ffcbae5e9dd4c24152840297190bcd (diff)
After discussion with Campbell (ideasman) on IRC I reorganized notifiers and created new one for visibility toggling (epilogue to r32052, fixing [#23944]).
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 50b9d68671c..165e61912d5 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -1571,10 +1571,9 @@ static int outliner_toggle_visibility_exec(bContext *C, wmOperator *op)
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_visibility_cb);
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_VISIBLE, scene);
ED_region_tag_redraw(ar);
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
-
return OPERATOR_FINISHED;
}
@@ -1612,6 +1611,7 @@ static int outliner_toggle_selectability_exec(bContext *C, wmOperator *op)
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_selectability_cb);
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
@@ -1705,6 +1705,7 @@ static int outliner_toggle_selected_exec(bContext *C, wmOperator *op)
{
SpaceOops *soops= CTX_wm_space_outliner(C);
ARegion *ar= CTX_wm_region(C);
+ Scene *scene= CTX_data_scene(C);
if (outliner_has_one_flag(soops, &soops->tree, TSE_SELECTED, 1))
outliner_set_flag(soops, &soops->tree, TSE_SELECTED, 0);
@@ -1713,6 +1714,7 @@ static int outliner_toggle_selected_exec(bContext *C, wmOperator *op)
soops->storeflag |= SO_TREESTORE_REDRAW;
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
@@ -3184,8 +3186,6 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto
te->directdata= NULL;
tselem->id= NULL;
}
-
- WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
}
@@ -3335,6 +3335,7 @@ void outliner_del(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops)
outliner_do_object_operation(C, scene, soops, &soops->tree, object_delete_cb);
DAG_scene_sort(CTX_data_main(C), scene);
ED_undo_push(C, "Delete Objects");
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
}
}
@@ -3372,34 +3373,37 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
}
str= "Select Objects";
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
}
else if(event==2) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_deselect_cb);
str= "Deselect Objects";
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
}
else if(event==4) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_delete_cb);
DAG_scene_sort(bmain, scene);
str= "Delete Objects";
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene);
}
- else if(event==5) { /* disabled, see above (ton) */
+ else if(event==5) { /* disabled, see above enum (ton) */
outliner_do_object_operation(C, scene, soops, &soops->tree, id_local_cb);
str= "Localized Objects";
}
else if(event==6) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_visibility_cb);
str= "Toggle Visibility";
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_VISIBLE, scene);
}
else if(event==7) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_selectability_cb);
str= "Toggle Selectability";
+ WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
}
else if(event==8) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_toggle_renderability_cb);
str= "Toggle Renderability";
}
-
- WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
ED_undo_push(C, str);