75 for (
int i = 0; i < edit->
totpoint; i++, pa++) {
87 for (; pm; pm = pm->
next) {
97 for (
int i = 0; i < edit->
totpoint; i++, point++) {
104 undo->
undo_size = mem_used_prev < mem_used_curr ? mem_used_curr - mem_used_prev :
154 key->time = &hkey->
time;
171 for (; pm; pm = pm->
next) {
180 if ((
int)key->ftime == (
int)pm->
frame) {
184 key->time = &key->ftime;
198 for (i = 0, point = undo->
points; i < undo->totpoint; i++, point++) {
236 return (edit !=
NULL);
307 ut->
name =
"Edit Particle";
struct Scene * CTX_data_scene(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
void psys_free_path_cache(struct ParticleSystem *psys, struct PTCacheEdit *edit)
void BKE_particle_batch_cache_dirty_tag(struct ParticleSystem *psys, int mode)
@ BKE_PARTICLE_BATCH_DIRTY_ALL
void BKE_ptcache_mem_pointers_incr(void *cur[BPHYS_TOT_DATA])
void BKE_ptcache_free_mem(struct ListBase *mem_cache)
struct PTCacheUndo PTCacheUndo
void BKE_ptcache_mem_pointers_init(struct PTCacheMem *pm, void *cur[BPHYS_TOT_DATA])
@ UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE
void(* UndoTypeForEachIDRefFn)(void *user_data, struct UndoRefID *id_ref)
void void void void void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src) ATTR_NONNULL(1
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
#define BPHYS_DATA_LOCATION
#define BPHYS_DATA_VELOCITY
#define BPHYS_DATA_ROTATION
#define OBACT(_view_layer)
void ED_object_particle_edit_mode_enter_ex(struct Depsgraph *depsgraph, struct Scene *scene, Object *ob)
struct PTCacheEdit * PE_get_current(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob)
void ED_undo_object_set_active_or_warn(struct Scene *scene, struct ViewLayer *view_layer, struct Object *ob, const char *info, struct CLG_LogRef *log)
Read Guarded memory(de)allocation.
const Depsgraph * depsgraph
void(* MEM_freeN)(void *vmemh)
size_t(* MEM_get_memory_in_use)(void)
void *(* MEM_dupallocN)(const void *vmemh)
static bool particle_undosys_poll(struct bContext *C)
static void undoptcache_to_editcache(PTCacheUndo *undo, PTCacheEdit *edit)
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_foreach_ID_ref(UndoStep *us_p, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
static void particle_undosys_step_free(UndoStep *us_p)
static bool particle_undosys_step_encode(struct bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p)
static void undoptcache_free_data(PTCacheUndo *undo)
void ED_particle_undosys_type(UndoType *ut)
static void undoptcache_from_editcache(PTCacheUndo *undo, PTCacheEdit *edit)
struct ParticleUndoStep ParticleUndoStep
struct PTCacheEditKey * keys
PTCacheEditPoint * points
struct ParticleSystem * psys
struct PointCache * cache
struct ListBase mem_cache
struct PTCacheEditPoint * points
struct ParticleData * particles
UndoRefID_Object object_ref
UndoRefID_Scene scene_ref
struct ListBase mem_cache
struct ToolSettings * toolsettings
void(* step_decode)(struct bContext *C, struct Main *bmain, UndoStep *us, const eUndoStepDir dir, bool is_final)
bool(* step_encode)(struct bContext *C, struct Main *bmain, UndoStep *us)
void(* step_foreach_ID_ref)(UndoStep *us, UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data)
void(* step_free)(UndoStep *us)
bool(* poll)(struct bContext *C)