diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-06 14:53:51 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-06-06 14:54:39 +0300 |
commit | b58e5d4f2c1bf43fdf57254d2c7acea1a3b5513b (patch) | |
tree | 3d54f7a414133696d43b61c8fe252fd74c2b4d7b /source/blender/editors | |
parent | 1295e85de0d2b51f6e7c79df8b1b63db7414db0e (diff) |
Particle edit: Fix missing hair with new oarticle system added
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index de12d187c3b..a5ca3cf8531 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -4506,7 +4506,16 @@ static int particle_edit_toggle_exec(bContext *C, wmOperator *op) if (!is_mode_set) { PTCacheEdit *edit; + /* Particle edit mode requires original object to have all strands + * cached. A bit annoying to do update here, but is simpler than + * rewriting the while edit mode code. + */ + ob->id.recalc |= (ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); + DEG_evaluate_on_refresh(depsgraph); + BKE_object_eval_transform_all(depsgraph, scene, ob); + BKE_object_handle_data_update(depsgraph, scene, ob); ob->mode |= mode_flag; + edit= PE_create_current(depsgraph, scene, ob); /* mesh may have changed since last entering editmode. |