diff options
Diffstat (limited to 'source/blender/editors/util/ed_util.c')
-rw-r--r-- | source/blender/editors/util/ed_util.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index fa28d9c2d6d..af387e4f7c2 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -35,6 +35,7 @@ #include "DNA_screen_types.h" #include "DNA_space_types.h" +#include "BLI_listbase.h" #include "BLI_path_util.h" #include "BLI_string.h" #include "BLI_utildefines.h" @@ -82,7 +83,7 @@ void ED_editors_init_for_undo(Main *bmain) { wmWindowManager *wm = bmain->wm.first; - for (wmWindow *win = wm->windows.first; win; win = win->next) { + LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { ViewLayer *view_layer = WM_window_get_active_view_layer(win); Base *base = BASACT(view_layer); if (base != NULL) { @@ -152,10 +153,10 @@ void ED_editors_init(bContext *C) ED_object_sculptmode_enter_ex(bmain, depsgraph, scene, ob, true, reports); } else if (mode == OB_MODE_VERTEX_PAINT) { - ED_object_vpaintmode_enter_ex(bmain, depsgraph, wm, scene, ob); + ED_object_vpaintmode_enter_ex(bmain, depsgraph, scene, ob); } else if (mode == OB_MODE_WEIGHT_PAINT) { - ED_object_wpaintmode_enter_ex(bmain, depsgraph, wm, scene, ob); + ED_object_wpaintmode_enter_ex(bmain, depsgraph, scene, ob); } else { BLI_assert(0); @@ -173,7 +174,7 @@ void ED_editors_init(bContext *C) else { /* TODO(campbell): avoid operator calls. */ if (obact == ob) { - ED_object_mode_toggle(C, mode); + ED_object_mode_set(C, mode); } } } @@ -224,8 +225,8 @@ void ED_editors_exit(Main *bmain, bool do_undo_system) } /* global in meshtools... */ - ED_mesh_mirror_spatial_table(NULL, NULL, NULL, NULL, 'e'); - ED_mesh_mirror_topo_table(NULL, NULL, 'e'); + ED_mesh_mirror_spatial_table_end(NULL); + ED_mesh_mirror_topo_table_end(NULL); } bool ED_editors_flush_edits_for_object_ex(Main *bmain, @@ -472,12 +473,12 @@ void ED_region_draw_mouse_line_cb(const bContext *C, ARegion *region, void *arg_ * * \param new_id: may be NULL to unlink \a old_id. */ -void ED_spacedata_id_remap(struct ScrArea *sa, struct SpaceLink *sl, ID *old_id, ID *new_id) +void ED_spacedata_id_remap(struct ScrArea *area, struct SpaceLink *sl, ID *old_id, ID *new_id) { SpaceType *st = BKE_spacetype_from_id(sl->spacetype); if (st && st->id_remap) { - st->id_remap(sa, sl, old_id, new_id); + st->id_remap(area, sl, old_id, new_id); } } |