|
Blender V4.3
|
#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "CLG_log.h"#include "DNA_scene_types.h"#include "DNA_windowmanager_types.h"#include "BLI_listbase.h"#include "BLI_utildefines.h"#include "BKE_context.hh"#include "BKE_layer.hh"#include "BKE_particle.h"#include "BKE_pointcache.h"#include "BKE_undo_system.hh"#include "DEG_depsgraph.hh"#include "ED_object.hh"#include "ED_particle.hh"#include "ED_physics.hh"#include "ED_undo.hh"#include "particle_edit_utildefines.h"Go to the source code of this file.
Classes | |
| struct | ParticleUndoStep |
Functions | |
Undo Conversion | |
| static void | undoptcache_from_editcache (PTCacheUndo *undo, PTCacheEdit *edit) |
| static void | undoptcache_to_editcache (PTCacheUndo *undo, PTCacheEdit *edit) |
| static void | undoptcache_free_data (PTCacheUndo *undo) |
Implements ED Undo System | |
| static bool | particle_undosys_poll (bContext *C) |
| static bool | particle_undosys_step_encode (bContext *C, Main *, UndoStep *us_p) |
| static void | particle_undosys_step_decode (bContext *C, Main *, UndoStep *us_p, const eUndoStepDir, bool) |
| static void | particle_undosys_step_free (UndoStep *us_p) |
| static void | particle_undosys_foreach_ID_ref (UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data) |
| void | ED_particle_undosys_type (UndoType *ut) |
Variables | |
| static CLG_LogRef | LOG = {"ed.undo.particle_edit"} |
| void ED_particle_undosys_type | ( | UndoType * | ut | ) |
Export for ED_undo_sys.
Definition at line 289 of file particle_edit_undo.cc.
References UndoType::flags, UndoType::name, particle_undosys_foreach_ID_ref(), particle_undosys_poll(), particle_undosys_step_decode(), particle_undosys_step_encode(), particle_undosys_step_free(), 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().
|
static |
Definition at line 280 of file particle_edit_undo.cc.
References ParticleUndoStep::object_ref, and ParticleUndoStep::scene_ref.
Referenced by ED_particle_undosys_type().
|
static |
Definition at line 209 of file particle_edit_undo.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_view_layer(), depsgraph, and PE_get_current().
Referenced by ED_particle_undosys_type(), and particle_undosys_step_decode().
|
static |
Definition at line 234 of file particle_edit_undo.cc.
References BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, BLI_assert, CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_view_layer(), CTX_wm_manager(), ParticleUndoStep::data, DEG_id_tag_update(), depsgraph, ED_object_particle_edit_mode_enter_ex(), ED_undo_object_editmode_validate_scene_from_windows(), ED_undo_object_set_active_or_warn(), ParticleEditSettings::flag, Object::id, ID_RECALC_GEOMETRY, LOG, UndoStep::name, ParticleUndoStep::object_ref, particle_undosys_poll(), PE_DRAW_PART, PE_get_current(), PTCacheEdit::psys, psys_free_path_cache(), ParticleUndoStep::scene_ref, undoptcache_to_editcache(), and UNLIKELY.
Referenced by ED_particle_undosys_type().
Definition at line 221 of file particle_edit_undo.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_view_layer(), ParticleUndoStep::data, depsgraph, ParticleUndoStep::object_ref, PE_get_current(), ParticleUndoStep::scene_ref, and undoptcache_from_editcache().
Referenced by ED_particle_undosys_type().
|
static |
Definition at line 274 of file particle_edit_undo.cc.
References ParticleUndoStep::data, and undoptcache_free_data().
Referenced by ED_particle_undosys_type().
|
static |
Definition at line 173 of file particle_edit_undo.cc.
References BKE_ptcache_free_mem(), ParticleData::hair, PTCacheUndo::mem_cache, MEM_freeN(), PTCacheUndo::particles, point, PTCacheUndo::points, and PTCacheUndo::totpoint.
Referenced by particle_undosys_step_free().
|
static |
Definition at line 45 of file particle_edit_undo.cc.
References BLI_duplicatelist(), BPHYS_TOT_DATA, PTCacheID::cache, PTCacheMem::data, ListBase::first, ParticleSystem::flag, ParticleData::hair, PointCache::mem_cache, PTCacheUndo::mem_cache, MEM_dupallocN, MEM_get_memory_in_use, PTCacheMem::next, ParticleSystem::particles, PTCacheUndo::particles, PTCacheEdit::pid, point, PTCacheEdit::points, PTCacheUndo::points, PTCacheEdit::psys, PTCacheUndo::psys_flag, PTCacheEdit::totpoint, PTCacheUndo::totpoint, and PTCacheUndo::undo_size.
Referenced by particle_undosys_step_encode().
|
static |
Definition at line 91 of file particle_edit_undo.cc.
References BKE_ptcache_free_mem(), BKE_ptcache_mem_pointers_incr(), BKE_ptcache_mem_pointers_init(), BLI_duplicatelist(), BPHYS_DATA_LOCATION, BPHYS_DATA_ROTATION, BPHYS_DATA_VELOCITY, BPHYS_TOT_DATA, PTCacheID::cache, HairKey::co, PTCacheMem::data, ListBase::first, ParticleSystem::flag, PTCacheMem::frame, ParticleData::hair, KEY_K, LOOP_KEYS, LOOP_POINTS, PointCache::mem_cache, PTCacheUndo::mem_cache, MEM_dupallocN, MEM_freeN(), MEM_SAFE_FREE, PTCacheEdit::mirror_cache, PTCacheMem::next, ParticleSystem::particles, PTCacheUndo::particles, PTCacheEdit::pid, POINT_P, PTCacheEdit::points, PTCacheUndo::points, PTCacheEdit::psys, PTCacheUndo::psys_flag, HairKey::time, ParticleSystem::totpart, PTCacheEdit::totpoint, and PTCacheUndo::totpoint.
Referenced by particle_undosys_step_decode().
|
static |
Only needed this locally.
Definition at line 39 of file particle_edit_undo.cc.
Referenced by particle_undosys_step_decode().