Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2015-01-30 12:54:05 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-04-20 13:24:33 +0300
commit4798464e8bbbcc3f92fbda82b1114c4824eaabf1 (patch)
tree67a96215cb77fad71caa9a16d8195b45e268c0c1 /source/blender/editors/hair/hair_undo.c
parent299859e40b2f9652ded56863e293c104705dbfb7 (diff)
Extended Mesh <-> BMesh copy function versions for specifying custom
data masks explicitly. A dummy mesh is used for strand edit undo storage like in mesh edit to prevent unnecessary code duplication. However, when copying from/to BMesh only the mesh data layers are copied by default, omitting the new data layers for strands (currently only MSurfaceSample hair root data).
Diffstat (limited to 'source/blender/editors/hair/hair_undo.c')
-rw-r--r--source/blender/editors/hair/hair_undo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/hair/hair_undo.c b/source/blender/editors/hair/hair_undo.c
index 14597687088..c3096e56219 100644
--- a/source/blender/editors/hair/hair_undo.c
+++ b/source/blender/editors/hair/hair_undo.c
@@ -96,7 +96,7 @@ static void *strands_edit_to_undo(void *editv, void *UNUSED(obdata))
/* BM_mesh_validate(em->bm); */ /* for troubleshooting */
- BM_mesh_bm_to_me(edit->bm, &undo->me, false);
+ BM_mesh_bm_to_me_ex(edit->bm, &undo->me, CD_MASK_STRANDS, false);
undo->selectmode = edit->bm->selectmode;
undo->shapenr = edit->bm->shapenr;
@@ -126,7 +126,7 @@ static void strands_undo_to_edit(void *undov, void *editv, void *UNUSED(obdata))
BKE_editstrands_free(edit);
- BM_mesh_bm_from_me(bm, &undo->me, true, false, undo->shapenr);
+ BM_mesh_bm_from_me_ex(bm, &undo->me, CD_MASK_STRANDS, false, false, undo->shapenr);
*edit = *edit_tmp;