Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/lattice/editlattice_undo.c
| Show First 20 Lines • Show All 272 Lines • ▼ Show 20 Lines | static void lattice_undosys_foreach_ID_ref(UndoStep *us_p, | ||||
| LatticeUndoStep *us = (LatticeUndoStep *)us_p; | LatticeUndoStep *us = (LatticeUndoStep *)us_p; | ||||
| for (uint i = 0; i < us->elems_len; i++) { | for (uint i = 0; i < us->elems_len; i++) { | ||||
| LatticeUndoStep_Elem *elem = &us->elems[i]; | LatticeUndoStep_Elem *elem = &us->elems[i]; | ||||
| foreach_ID_ref_fn(user_data, ((UndoRefID *)&elem->obedit_ref)); | foreach_ID_ref_fn(user_data, ((UndoRefID *)&elem->obedit_ref)); | ||||
| } | } | ||||
| } | } | ||||
| /* Export for ED_undo_sys. */ | |||||
| void ED_lattice_undosys_type(UndoType *ut) | void ED_lattice_undosys_type(UndoType *ut) | ||||
| { | { | ||||
| ut->name = "Edit Lattice"; | ut->name = "Edit Lattice"; | ||||
| ut->poll = lattice_undosys_poll; | ut->poll = lattice_undosys_poll; | ||||
| ut->step_encode = lattice_undosys_step_encode; | ut->step_encode = lattice_undosys_step_encode; | ||||
| ut->step_decode = lattice_undosys_step_decode; | ut->step_decode = lattice_undosys_step_decode; | ||||
| ut->step_free = lattice_undosys_step_free; | ut->step_free = lattice_undosys_step_free; | ||||
| ut->step_foreach_ID_ref = lattice_undosys_foreach_ID_ref; | ut->step_foreach_ID_ref = lattice_undosys_foreach_ID_ref; | ||||
| ut->flags = UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE; | ut->flags = UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE; | ||||
| ut->step_size = sizeof(LatticeUndoStep); | ut->step_size = sizeof(LatticeUndoStep); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||