Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/metaball/editmball_undo.c
| Show First 20 Lines • Show All 247 Lines • ▼ Show 20 Lines | static void mball_undosys_foreach_ID_ref(UndoStep *us_p, | ||||
| MBallUndoStep *us = (MBallUndoStep *)us_p; | MBallUndoStep *us = (MBallUndoStep *)us_p; | ||||
| for (uint i = 0; i < us->elems_len; i++) { | for (uint i = 0; i < us->elems_len; i++) { | ||||
| MBallUndoStep_Elem *elem = &us->elems[i]; | MBallUndoStep_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_mball_undosys_type(UndoType *ut) | void ED_mball_undosys_type(UndoType *ut) | ||||
| { | { | ||||
| ut->name = "Edit MBall"; | ut->name = "Edit MBall"; | ||||
| ut->poll = mball_undosys_poll; | ut->poll = mball_undosys_poll; | ||||
| ut->step_encode = mball_undosys_step_encode; | ut->step_encode = mball_undosys_step_encode; | ||||
| ut->step_decode = mball_undosys_step_decode; | ut->step_decode = mball_undosys_step_decode; | ||||
| ut->step_free = mball_undosys_step_free; | ut->step_free = mball_undosys_step_free; | ||||
| ut->step_foreach_ID_ref = mball_undosys_foreach_ID_ref; | ut->step_foreach_ID_ref = mball_undosys_foreach_ID_ref; | ||||
| ut->flags = UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE; | ut->flags = UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE; | ||||
| ut->step_size = sizeof(MBallUndoStep); | ut->step_size = sizeof(MBallUndoStep); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||