diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-12 16:20:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-12 16:20:49 +0300 |
commit | f1a542b6b80b8a7dcce0484dd4146d2ede72831d (patch) | |
tree | c42fe0eae63c746ddb9b5260993c6fc072262777 /source/blender | |
parent | 6329f7b063057b3617810677e2175d5b8af30bc1 (diff) |
particle edit
the emitter field wasnt recalculated on entering on editmode.
this meant you could use the puff brush in particle edit, move mesh verts, go back into particle edit... And the mesh data from the previous mesh would still be used.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index c510a28b7ad..c1846c6a493 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -88,6 +88,7 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache, ParticleSystem *psys); static void PTCacheUndo_clear(PTCacheEdit *edit); +static void recalc_emitter_field(Object *ob, ParticleSystem *psys); #define KEY_K PTCacheEditKey *key; int k #define POINT_P PTCacheEditPoint *point; int p @@ -265,8 +266,13 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create) } } - if(edit) + if(edit) { edit->pid = *pid; + + /* mesh may have changed since last entering editmode. + * note, this may have run before if the edit data was just created, so could avoid this and speed up a little */ + recalc_emitter_field(ob, edit->psys); + } BLI_freelistN(&pidlist); |