[Bf-blender-cvs] [c80c545] strand_editmode: Minor code reshuffling.
Lukas Tönne
noreply at git.blender.org
Fri Jan 30 11:25:45 CET 2015
Commit: c80c54516026f6ee8b1bf5ffec4d616c769ec1ce
Author: Lukas Tönne
Date: Fri Jan 30 11:25:33 2015 +0100
Branches: strand_editmode
https://developer.blender.org/rBc80c54516026f6ee8b1bf5ffec4d616c769ec1ce
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