diff options
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 18 |
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); |