Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/util/undo.c
| Show All 39 Lines | |||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "BKE_blender_undo.h" | #include "BKE_blender_undo.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_library_override.h" | |||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "ED_armature.h" | #include "ED_armature.h" | ||||
| #include "ED_particle.h" | #include "ED_particle.h" | ||||
| #include "ED_curve.h" | #include "ED_curve.h" | ||||
| #include "ED_gpencil.h" | #include "ED_gpencil.h" | ||||
| #include "ED_mball.h" | #include "ED_mball.h" | ||||
| Show All 21 Lines | |||||
| void ED_undo_push(bContext *C, const char *str) | void ED_undo_push(bContext *C, const char *str) | ||||
| { | { | ||||
| Object *obedit = CTX_data_edit_object(C); | Object *obedit = CTX_data_edit_object(C); | ||||
| Object *obact = CTX_data_active_object(C); | Object *obact = CTX_data_active_object(C); | ||||
| if (G.debug & G_DEBUG) | if (G.debug & G_DEBUG) | ||||
| printf("%s: %s\n", __func__, str); | printf("%s: %s\n", __func__, str); | ||||
| /* Always do it for now, this might need to be refined... */ | |||||
| BKE_main_override_static_operations_create(CTX_data_main(C)); | |||||
| if (obedit) { | if (obedit) { | ||||
| if (U.undosteps == 0) return; | if (U.undosteps == 0) return; | ||||
| if (obedit->type == OB_MESH) | if (obedit->type == OB_MESH) | ||||
| undo_push_mesh(C, str); | undo_push_mesh(C, str); | ||||
| else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) | else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) | ||||
| undo_push_curve(C, str); | undo_push_curve(C, str); | ||||
| else if (obedit->type == OB_FONT) | else if (obedit->type == OB_FONT) | ||||
| ▲ Show 20 Lines • Show All 577 Lines • Show Last 20 Lines | |||||