[Bf-blender-cvs] [8c4b4fdd145] blender-v2.79-release: Missed last commit
Campbell Barton
noreply at git.blender.org
Mon Sep 4 13:12:40 CEST 2017
Commit: 8c4b4fdd145cfc20e0eaf4eec0e988af8fb46340
Author: Campbell Barton
Date: Sun Aug 27 03:48:18 2017 +1000
Branches: blender-v2.79-release
https://developer.blender.org/rB8c4b4fdd145cfc20e0eaf4eec0e988af8fb46340
Missed last commit
===================================================================
M source/blender/bmesh/intern/bmesh_mesh_conv.c
===================================================================
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index 2edc043cb13..7787d704b59 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@ -219,6 +219,11 @@ static BMFace *bm_face_create_from_mpoly(
/**
* \brief Mesh -> BMesh
+ * \param bm: The mesh to write into, while this is typically a newly created BMesh,
+ * merging into existing data is supported.
+ * Note the custom-data layout isn't used.
+ * If more comprehensive merging is needed we should move this into a separate function
+ * since this should be kept fast for edit-mode switching and storing undo steps.
*
* \warning This function doesn't calculate face normals.
*/
@@ -240,8 +245,6 @@ void BM_mesh_bm_from_me(
float (*keyco)[3] = NULL;
int totuv, totloops, i;
- /* free custom data */
-
if (!me || !me->totvert) {
if (me && is_new) { /*no verts? still copy customdata layout*/
CustomData_copy(&me->vdata, &bm->vdata, CD_MASK_BMESH, CD_ASSIGN, 0);
@@ -293,18 +296,20 @@ void BM_mesh_bm_from_me(
}
if (tot_shape_keys) {
- /* check if we need to generate unique ids for the shapekeys.
- * this also exists in the file reading code, but is here for
- * a sanity check */
- if (!me->key->uidgen) {
- fprintf(stderr,
- "%s had to generate shape key uid's in a situation we shouldn't need to! "
- "(bmesh internal error)\n",
- __func__);
-
- me->key->uidgen = 1;
- for (block = me->key->block.first; block; block = block->next) {
- block->uid = me->key->uidgen++;
+ if (is_new) {
+ /* check if we need to generate unique ids for the shapekeys.
+ * this also exists in the file reading code, but is here for
+ * a sanity check */
+ if (!me->key->uidgen) {
+ fprintf(stderr,
+ "%s had to generate shape key uid's in a situation we shouldn't need to! "
+ "(bmesh internal error)\n",
+ __func__);
+
+ me->key->uidgen = 1;
+ for (block = me->key->block.first; block; block = block->next) {
+ block->uid = me->key->uidgen++;
+ }
}
}
More information about the Bf-blender-cvs
mailing list