70 ListBaseT<bDeformGroup> *vertex_group_names,
71 int *vertex_group_active_index)
75 if (len_src != len_dst) {
76 MEM_delete(editlatt->
latt->
def);
88 "Lattice MDeformVert");
110 vertex_group_names->free_no_destruct();
119 const ListBaseT<bDeformGroup> *vertex_group_names,
120 int vertex_group_active_index)
163 MEM_delete(ult->
def);
167 ult->
dvert =
nullptr;
173static int validate_undoLatt(
void *
data,
void *edata)
175 UndoLattice *ult = (UndoLattice *)
data;
176 EditLatt *editlatt = (EditLatt *)edata;
178 return (ult->pntsu == editlatt->latt->pntsu && ult->pntsv == editlatt->latt->pntsv &&
179 ult->pntsw == editlatt->latt->pntsw);
240 for (
uint i = 0; i < objects.
size(); i++) {
278 "name='%s', failed to enter edit-mode for object '%s', undo state invalid",
330 MEM_delete(us->
elems);
General operations, lookup, etc. for blender objects.
Generic array manipulation API.
#define BLI_array_is_zeroed(arr, arr_len)
#define CLOG_ERROR(clg_ref,...)
Object is a sort of wrapper for general info.
Read Blender memory allocation and freeing.
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
static void undolatt_free_data(UndoLattice *ult)
void BKE_defvert_array_free(MDeformVert *dvert, int totvert)
char * STRNCPY(char(&dst)[N], const char *src)
static void lattice_undosys_step_free(UndoStep *us_p)
void BKE_lattice_resize(Lattice *lt, int u_new, int v_new, int w_new, Object *lt_ob)
void * MEM_new_array_uninitialized(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
void BKE_defvert_array_copy(MDeformVert *dst, const MDeformVert *src, int totvert)
@ UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE
@ UNDOTYPE_FLAG_ENCODE_PRE_MEMFILE_SUPPORTED
void BKE_lattice_params_copy(Lattice *lt_dst, const Lattice *lt_src)
static void lattice_undosys_foreach_ID_ref(UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
static Object * editlatt_object_from_context(bContext *C)
static void lattice_undosys_step_decode(bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir, bool)
void ED_undo_object_set_active_or_warn(const Main &bmain, Scene *scene, ViewLayer *view_layer, Object *ob, const char *info, CLG_LogRef *log)
void ED_lattice_undosys_type(UndoType *ut)
Vector< Object * > ED_undo_editmode_objects_from_view_layer(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
ViewLayer * CTX_data_view_layer(const bContext *C)
Object * BKE_view_layer_edit_object_get(const ViewLayer *view_layer)
void DEG_id_tag_update(ID *id, unsigned int flags)
BMesh const char void * data
wmWindowManager * CTX_wm_manager(const bContext *C)
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
static void undolatt_to_editlatt(UndoLattice *ult, EditLatt *editlatt, ListBaseT< bDeformGroup > *vertex_group_names, int *vertex_group_active_index)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool BKE_object_is_in_editmode(const Object *ob)
Main * CTX_data_main(const bContext *C)
void BKE_defgroup_copy_list(ListBaseT< bDeformGroup > *outbase, const ListBaseT< bDeformGroup > *inbase)
void ED_undo_object_editmode_restore_helper(Scene *scene, ViewLayer *view_layer, Object **object_array, uint object_array_len, uint object_array_stride)
void(*)(void *user_data, UndoRefID *id_ref) UndoTypeForEachIDRefFn
Scene * CTX_data_scene(const bContext *C)
static bool lattice_undosys_step_encode(bContext *C, Main *bmain, UndoStep *us_p)
static void * undolatt_from_editlatt(UndoLattice *ult, EditLatt *editlatt, const ListBaseT< bDeformGroup > *vertex_group_names, int vertex_group_active_index)
static bool lattice_undosys_poll(bContext *C)
void ED_undo_object_editmode_validate_scene_from_windows(wmWindowManager *wm, const Scene *scene_ref, Scene **scene_p, ViewLayer **view_layer_p)
void * MEM_new_array_zeroed(size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
UndoRefID_Object obedit_ref
LatticeUndoStep_Elem * elems
UndoRefID_Scene scene_ref
struct EditLatt * editlatt
struct MDeformVert * dvert
int vertex_group_active_index
ListBaseT< struct bDeformGroup > vertex_group_names
bool is_memfile_undo_flush_needed
ListBaseT< bDeformGroup > vertex_group_names
int vertex_group_active_index
bool(*) poll(bContext *C)
void(*) step_free(UndoStep *us)
void(*) step_decode(bContext *C, Main *bmain, UndoStep *us, eUndoStepDir dir, bool is_final)
void(*) step_foreach_ID_ref(UndoStep *us, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
bool(*) step_encode(bContext *C, Main *bmain, UndoStep *us)