|
Blender V4.3
|
#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "CLG_log.h"#include "BLI_array_utils.h"#include "BLI_utildefines.h"#include "DNA_curve_types.h"#include "DNA_lattice_types.h"#include "DNA_meshdata_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BKE_context.hh"#include "BKE_deform.hh"#include "BKE_layer.hh"#include "BKE_main.hh"#include "BKE_object.hh"#include "BKE_undo_system.hh"#include "DEG_depsgraph.hh"#include "ED_lattice.hh"#include "ED_object.hh"#include "ED_undo.hh"#include "ED_util.hh"#include "WM_api.hh"#include "WM_types.hh"#include "lattice_intern.hh"Go to the source code of this file.
Classes | |
| struct | UndoLattice |
| struct | LatticeUndoStep_Elem |
| struct | LatticeUndoStep |
Functions | |
Undo Conversion | |
| static void | undolatt_to_editlatt (UndoLattice *ult, EditLatt *editlatt) |
| static void * | undolatt_from_editlatt (UndoLattice *ult, EditLatt *editlatt) |
| static void | undolatt_free_data (UndoLattice *ult) |
| static Object * | editlatt_object_from_context (bContext *C) |
Implements ED Undo System | |
| |
| static bool | lattice_undosys_poll (bContext *C) |
| static bool | lattice_undosys_step_encode (bContext *C, Main *bmain, UndoStep *us_p) |
| static void | lattice_undosys_step_decode (bContext *C, Main *bmain, UndoStep *us_p, const eUndoStepDir, bool) |
| static void | lattice_undosys_step_free (UndoStep *us_p) |
| static void | lattice_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data) |
| void | ED_lattice_undosys_type (UndoType *ut) |
Variables | |
| static CLG_LogRef | LOG = {"ed.undo.lattice"} |
| void ED_lattice_undosys_type | ( | UndoType * | ut | ) |
Export for ED_undo_sys.
Definition at line 297 of file editlattice_undo.cc.
References UndoType::flags, lattice_undosys_foreach_ID_ref(), lattice_undosys_poll(), lattice_undosys_step_decode(), lattice_undosys_step_encode(), lattice_undosys_step_free(), UndoType::name, UndoType::poll, UndoType::step_decode, UndoType::step_encode, UndoType::step_foreach_ID_ref, UndoType::step_free, UndoType::step_size, and UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE.
Referenced by ED_undosys_type_init().
Definition at line 157 of file editlattice_undo.cc.
References BKE_view_layer_edit_object_get(), BKE_view_layer_synced_ensure(), CTX_data_scene(), CTX_data_view_layer(), Object::data, Lattice::editlatt, OB_LATTICE, and Object::type.
Referenced by lattice_undosys_poll().
|
static |
Definition at line 284 of file editlattice_undo.cc.
References LatticeUndoStep::elems, LatticeUndoStep::elems_len, LatticeUndoStep_Elem::obedit_ref, and LatticeUndoStep::scene_ref.
Referenced by ED_lattice_undosys_type().
|
static |
Definition at line 194 of file editlattice_undo.cc.
References editlatt_object_from_context().
Referenced by ED_lattice_undosys_type(), and lattice_undosys_step_decode().
|
static |
Definition at line 230 of file editlattice_undo.cc.
References BKE_object_is_in_editmode(), BLI_assert, CLOG_ERROR, CTX_data_scene(), CTX_data_view_layer(), CTX_wm_manager(), LatticeUndoStep_Elem::data, Object::data, DEG_id_tag_update(), ED_undo_object_editmode_restore_helper(), ED_undo_object_editmode_validate_scene_from_windows(), ED_undo_object_set_active_or_warn(), Lattice::editlatt, LatticeUndoStep::elems, LatticeUndoStep::elems_len, Lattice::id, Object::id, ID_RECALC_GEOMETRY, Main::is_memfile_undo_flush_needed, lattice_undosys_poll(), LOG, ID::name, UndoStep::name, NC_GEOM, ND_DATA, EditLatt::needs_flush_to_id, LatticeUndoStep_Elem::obedit_ref, LatticeUndoStep::scene_ref, undolatt_to_editlatt(), and WM_event_add_notifier().
Referenced by ED_lattice_undosys_type().
Definition at line 199 of file editlattice_undo.cc.
References CTX_data_scene(), CTX_data_view_layer(), LatticeUndoStep_Elem::data, Object::data, UndoStep::data_size, ED_undo_editmode_objects_from_view_layer(), Lattice::editlatt, LatticeUndoStep::elems, LatticeUndoStep::elems_len, Main::is_memfile_undo_flush_needed, MEM_callocN, EditLatt::needs_flush_to_id, LatticeUndoStep_Elem::obedit_ref, scene, LatticeUndoStep::scene_ref, LatticeUndoStep::step, UndoLattice::undo_size, and undolatt_from_editlatt().
Referenced by ED_lattice_undosys_type().
|
static |
Definition at line 273 of file editlattice_undo.cc.
References LatticeUndoStep_Elem::data, LatticeUndoStep::elems, LatticeUndoStep::elems_len, MEM_freeN(), and undolatt_free_data().
Referenced by ED_lattice_undosys_type().
|
static |
Definition at line 135 of file editlattice_undo.cc.
References BKE_defvert_array_free(), UndoLattice::def, UndoLattice::dvert, MEM_freeN(), UndoLattice::pntsu, UndoLattice::pntsv, and UndoLattice::pntsw.
Referenced by lattice_undosys_step_free().
|
static |
Definition at line 101 of file editlattice_undo.cc.
References Lattice::actbp, UndoLattice::actbp, BKE_defvert_array_copy(), BLI_array_is_zeroed, BLI_assert, Lattice::def, UndoLattice::def, Lattice::du, UndoLattice::du, Lattice::dv, UndoLattice::dv, Lattice::dvert, UndoLattice::dvert, Lattice::dw, UndoLattice::dw, Lattice::fu, UndoLattice::fu, Lattice::fv, UndoLattice::fv, Lattice::fw, UndoLattice::fw, EditLatt::latt, MEM_dupallocN, MEM_mallocN, Lattice::pntsu, UndoLattice::pntsu, Lattice::pntsv, UndoLattice::pntsv, Lattice::pntsw, UndoLattice::pntsw, Lattice::typeu, UndoLattice::typeu, Lattice::typev, UndoLattice::typev, Lattice::typew, UndoLattice::typew, and UndoLattice::undo_size.
Referenced by lattice_undosys_step_encode().
|
static |
Definition at line 63 of file editlattice_undo.cc.
References Lattice::actbp, UndoLattice::actbp, BKE_defvert_array_copy(), BKE_defvert_array_free(), Lattice::def, UndoLattice::def, Lattice::du, UndoLattice::du, Lattice::dv, UndoLattice::dv, Lattice::dvert, UndoLattice::dvert, Lattice::dw, UndoLattice::dw, Lattice::fu, UndoLattice::fu, Lattice::fv, UndoLattice::fv, Lattice::fw, UndoLattice::fw, EditLatt::latt, MEM_dupallocN, MEM_freeN(), MEM_mallocN, Lattice::pntsu, UndoLattice::pntsu, Lattice::pntsv, UndoLattice::pntsv, Lattice::pntsw, UndoLattice::pntsw, Lattice::typeu, UndoLattice::typeu, Lattice::typev, UndoLattice::typev, Lattice::typew, and UndoLattice::typew.
Referenced by lattice_undosys_step_decode().
|
static |
We only need this locally.
Definition at line 46 of file editlattice_undo.cc.
Referenced by lattice_undosys_step_decode().