[Bf-blender-cvs] [5b9b779] strand_editmode: Minor code reshuffling.
Lukas Tönne
noreply at git.blender.org
Mon Apr 20 14:24:28 CEST 2015
Commit: 5b9b779cabe207bc70e0b526e8a7fa2d9baf7f74
Author: Lukas Tönne
Date: Fri Jan 30 11:25:33 2015 +0100
Branches: strand_editmode
https://developer.blender.org/rB5b9b779cabe207bc70e0b526e8a7fa2d9baf7f74
Minor code reshuffling.
===================================================================
M source/blender/editors/hair/hair_undo.c
===================================================================
diff --git a/source/blender/editors/hair/hair_undo.c b/source/blender/editors/hair/hair_undo.c
index c3096e5..0b169a8 100644
--- a/source/blender/editors/hair/hair_undo.c
+++ b/source/blender/editors/hair/hair_undo.c
@@ -117,17 +117,15 @@ static void strands_undo_to_edit(void *undov, void *editv, void *UNUSED(obdata))
edit->bm->shapenr = undo->shapenr;
- /* note: have to create the new edit before the old one,
- * since it owns the root_dm and we have to copy it before
+ bm = BM_mesh_create(&allocsize);
+ BM_mesh_bm_from_me_ex(bm, &undo->me, CD_MASK_STRANDS, false, false, undo->shapenr);
+
+ /* note: have to create the new edit before freeing the old one,
+ * because it owns the root_dm and we have to copy it before
* it gets released when freeing the old edit.
*/
- bm = BM_mesh_create(&allocsize);
edit_tmp = BKE_editstrands_create(bm, dm);
-
BKE_editstrands_free(edit);
-
- BM_mesh_bm_from_me_ex(bm, &undo->me, CD_MASK_STRANDS, false, false, undo->shapenr);
-
*edit = *edit_tmp;
bm->selectmode = undo->selectmode;
More information about the Bf-blender-cvs
mailing list