Blender
V3.3
|
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "CLG_log.h"
#include "DNA_meshdata_types.h"
#include "DNA_scene_types.h"
#include "DNA_windowmanager_types.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "BKE_context.h"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_undo_system.h"
#include "DEG_depsgraph.h"
#include "ED_object.h"
#include "ED_particle.h"
#include "ED_physics.h"
#include "ED_undo.h"
#include "particle_edit_utildefines.h"
#include "physics_intern.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) |
Variables | |
static CLG_LogRef | LOG = {"ed.undo.particle_edit"} |
Implements ED Undo System | |
typedef struct ParticleUndoStep | ParticleUndoStep |
static bool | particle_undosys_poll (struct bContext *C) |
static bool | particle_undosys_step_encode (struct bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p) |
static void | particle_undosys_step_decode (struct bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p, const eUndoStepDir UNUSED(dir), bool UNUSED(is_final)) |
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) |
typedef struct ParticleUndoStep ParticleUndoStep |
Export for ED_undo_sys.
Definition at line 285 of file particle_edit_undo.c.
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 276 of file particle_edit_undo.c.
References ParticleUndoStep::object_ref, ParticleUndoStep::scene_ref, and user_data.
Referenced by ED_particle_undosys_type().
Definition at line 209 of file particle_edit_undo.c.
References C, CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_view_layer(), depsgraph, NULL, OBACT, PE_get_current(), and scene.
Referenced by ED_particle_undosys_type(), and particle_undosys_step_decode().
|
static |
Definition at line 234 of file particle_edit_undo.c.
References BKE_particle_batch_cache_dirty_tag(), BKE_PARTICLE_BATCH_DIRTY_ALL, BLI_assert, C, CTX_data_depsgraph_pointer(), CTX_data_view_layer(), ParticleUndoStep::data, DEG_id_tag_update(), depsgraph, ED_object_particle_edit_mode_enter_ex(), ED_undo_object_set_active_or_warn(), ParticleEditSettings::flag, Object::id, ID_RECALC_GEOMETRY, LOG, UndoStep::name, NULL, ParticleUndoStep::object_ref, ToolSettings::particle, particle_undosys_poll(), PE_DRAW_PART, PE_get_current(), PTCacheEdit::psys, psys_free_path_cache(), scene, ParticleUndoStep::scene_ref, Scene::toolsettings, undoptcache_to_editcache(), and UNLIKELY.
Referenced by ED_particle_undosys_type().
|
static |
Definition at line 220 of file particle_edit_undo.c.
References C, CTX_data_depsgraph_pointer(), CTX_data_scene(), CTX_data_view_layer(), ParticleUndoStep::data, depsgraph, OBACT, ParticleUndoStep::object_ref, PE_get_current(), ParticleUndoStep::scene_ref, and undoptcache_from_editcache().
Referenced by ED_particle_undosys_type().
Definition at line 270 of file particle_edit_undo.c.
References ParticleUndoStep::data, and undoptcache_free_data().
Referenced by ED_particle_undosys_type().
|
static |
Definition at line 174 of file particle_edit_undo.c.
References BKE_ptcache_free_mem(), ParticleData::hair, PTCacheUndo::mem_cache, MEM_freeN, PTCacheUndo::particles, point, and PTCacheUndo::points.
Referenced by particle_undosys_step_free().
|
static |
Definition at line 46 of file particle_edit_undo.c.
References BLI_duplicatelist(), BPHYS_TOT_DATA, PTCacheID::cache, PTCacheMem::data, ListBase::first, ParticleSystem::flag, ParticleData::hair, PTCacheUndo::mem_cache, PointCache::mem_cache, MEM_dupallocN, MEM_get_memory_in_use, PTCacheMem::next, PTCacheUndo::particles, ParticleSystem::particles, PTCacheEdit::pid, point, PTCacheUndo::points, PTCacheEdit::points, PTCacheEdit::psys, PTCacheUndo::psys_flag, PTCacheUndo::totpoint, PTCacheEdit::totpoint, and PTCacheUndo::undo_size.
Referenced by particle_undosys_step_encode().
|
static |
Definition at line 92 of file particle_edit_undo.c.
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, PTCacheUndo::mem_cache, PointCache::mem_cache, MEM_dupallocN, MEM_freeN, MEM_SAFE_FREE, PTCacheEdit::mirror_cache, PTCacheMem::next, PTCacheUndo::particles, ParticleSystem::particles, PTCacheEdit::pid, point, POINT_P, PTCacheUndo::points, PTCacheEdit::points, PTCacheEdit::psys, PTCacheUndo::psys_flag, HairKey::time, ParticleSystem::totpart, PTCacheUndo::totpoint, and PTCacheEdit::totpoint.
Referenced by particle_undosys_step_decode().
|
static |
Only needed this locally.
Definition at line 40 of file particle_edit_undo.c.
Referenced by particle_undosys_step_decode().