Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/util/editmode_undo.c
| Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | while (uel) { | ||||
| void *editdata = uel->getdata(C); | void *editdata = uel->getdata(C); | ||||
| bool is_valid = false; | bool is_valid = false; | ||||
| next = uel->next; | next = uel->next; | ||||
| /* for when objects are converted, renamed, or global undo changes pointers... */ | /* for when objects are converted, renamed, or global undo changes pointers... */ | ||||
| if (uel->type == obedit->type) { | if (uel->type == obedit->type) { | ||||
| if (strcmp(uel->id.name, obedit->id.name) == 0) { | if (strcmp(uel->id.name, obedit->id.name) == 0) { | ||||
| if (uel->validate_undo == NULL) | if (uel->validate_undo == NULL) | ||||
| is_valid = TRUE; | is_valid = true; | ||||
| else if (uel->validate_undo(uel->undodata, editdata)) | else if (uel->validate_undo(uel->undodata, editdata)) | ||||
| is_valid = TRUE; | is_valid = true; | ||||
| } | } | ||||
| } | } | ||||
| if (is_valid) | if (is_valid) | ||||
| uel->ob = obedit; | uel->ob = obedit; | ||||
| else { | else { | ||||
| if (uel == curundo) | if (uel == curundo) | ||||
| curundo = NULL; | curundo = NULL; | ||||
| ▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines | |||||