[Bf-blender-cvs] [b58e5d4f2c1] blender2.8: Particle edit: Fix missing hair with new oarticle system added

Sergey Sharybin noreply at git.blender.org
Wed Jun 6 13:54:48 CEST 2018


Commit: b58e5d4f2c1bf43fdf57254d2c7acea1a3b5513b
Author: Sergey Sharybin
Date:   Wed Jun 6 13:53:51 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBb58e5d4f2c1bf43fdf57254d2c7acea1a3b5513b

Particle edit: Fix missing hair with new oarticle system added

===================================================================

M	source/blender/editors/physics/particle_edit.c

===================================================================

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.



More information about the Bf-blender-cvs mailing list