Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/util/ed_util.c
| Show All 29 Lines | |||||
| #include "DNA_armature_types.h" | #include "DNA_armature_types.h" | ||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_packedFile_types.h" | #include "DNA_packedFile_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_screen_types.h" | #include "DNA_screen_types.h" | ||||
| #include "DNA_space_types.h" | #include "DNA_space_types.h" | ||||
| #include "BLI_listbase.h" | |||||
| #include "BLI_path_util.h" | #include "BLI_path_util.h" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| Show All 31 Lines | |||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| /* ********* general editor util funcs, not BKE stuff please! ********* */ | /* ********* general editor util funcs, not BKE stuff please! ********* */ | ||||
| void ED_editors_init_for_undo(Main *bmain) | void ED_editors_init_for_undo(Main *bmain) | ||||
| { | { | ||||
| wmWindowManager *wm = bmain->wm.first; | 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); | ViewLayer *view_layer = WM_window_get_active_view_layer(win); | ||||
| Base *base = BASACT(view_layer); | Base *base = BASACT(view_layer); | ||||
| if (base != NULL) { | if (base != NULL) { | ||||
| Object *ob = base->object; | Object *ob = base->object; | ||||
| if (ob->mode & OB_MODE_TEXTURE_PAINT) { | if (ob->mode & OB_MODE_TEXTURE_PAINT) { | ||||
| Scene *scene = WM_window_get_active_scene(win); | Scene *scene = WM_window_get_active_scene(win); | ||||
| BKE_texpaint_slots_refresh_object(scene, ob); | BKE_texpaint_slots_refresh_object(scene, ob); | ||||
| ▲ Show 20 Lines • Show All 410 Lines • Show Last 20 Lines | |||||