Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_undo.c
| Show First 20 Lines • Show All 662 Lines • ▼ Show 20 Lines | |||||
| static UndoImageHandle *uhandle_add(ListBase *undo_handles, Image *image, ImageUser *iuser) | static UndoImageHandle *uhandle_add(ListBase *undo_handles, Image *image, ImageUser *iuser) | ||||
| { | { | ||||
| BLI_assert(uhandle_lookup(undo_handles, image, iuser->tile) == NULL); | BLI_assert(uhandle_lookup(undo_handles, image, iuser->tile) == NULL); | ||||
| UndoImageHandle *uh = MEM_callocN(sizeof(*uh), __func__); | UndoImageHandle *uh = MEM_callocN(sizeof(*uh), __func__); | ||||
| uh->image_ref.ptr = image; | uh->image_ref.ptr = image; | ||||
| uh->iuser = *iuser; | uh->iuser = *iuser; | ||||
| uh->iuser.scene = NULL; | uh->iuser.scene = NULL; | ||||
| uh->iuser.ok = 1; | |||||
| BLI_addtail(undo_handles, uh); | BLI_addtail(undo_handles, uh); | ||||
| return uh; | return uh; | ||||
| } | } | ||||
| static UndoImageHandle *uhandle_ensure(ListBase *undo_handles, Image *image, ImageUser *iuser) | static UndoImageHandle *uhandle_ensure(ListBase *undo_handles, Image *image, ImageUser *iuser) | ||||
| { | { | ||||
| UndoImageHandle *uh = uhandle_lookup(undo_handles, image, iuser->tile); | UndoImageHandle *uh = uhandle_lookup(undo_handles, image, iuser->tile); | ||||
| if (uh == NULL) { | if (uh == NULL) { | ||||
| ▲ Show 20 Lines • Show All 433 Lines • Show Last 20 Lines | |||||