diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-19 16:25:48 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-19 16:28:33 +0300 |
commit | d8f9ec1547387bf363e9c7100322a7d94f08f12a (patch) | |
tree | ebb07e56bb90954eedd97e6a8d03ef28be381853 /source/blender/blenkernel/BKE_pointcache.h | |
parent | 95306a4d1982e569616211d901bb81b0467d0b8b (diff) |
Particles: Support changing modifiers during particle edit mode
The idea is to only use pointers to particles in original object when
creating an edit structure. The derived mesh we get from evaluated
object.
The rest of the commit is just keeping pointers in sync.
Diffstat (limited to 'source/blender/blenkernel/BKE_pointcache.h')
-rw-r--r-- | source/blender/blenkernel/BKE_pointcache.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index 8daef0348b9..21673213db1 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -246,13 +246,25 @@ typedef struct PTCacheUndo { size_t undo_size; } PTCacheUndo; +enum { + /* Modifier stack got evaluated during particle edit mode, need to copy + * new evaluated particles to the edit struct. + */ + PT_CACHE_EDIT_UPDATE_PARTICLE_FROM_EVAL = (1 << 0), +}; + typedef struct PTCacheEdit { + int flags; + PTCacheEditPoint *points; struct PTCacheID pid; /* particles stuff */ struct ParticleSystem *psys; + struct ParticleSystem *psys_eval; + struct ParticleSystemModifierData *psmd; + struct ParticleSystemModifierData *psmd_eval; struct KDTree *emitter_field; float *emitter_cosnos; /* localspace face centers and normals (average of its verts), from the derived mesh */ int *mirror_cache; |