Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc., 'simply' do the same for the mask flags we use all around Blender code to request some data, or limit some operation to some layers, etc. Reason we need this is that some cddata types (like Normals) are actually shared between verts/polys/loops, and we don’t want to generate clnors everytime we request vnors! As a side note, this also does final fix to T59338, which was the trigger for this patch (need to request computed loop normals for another mesh than evaluated one). Reviewers: brecht, campbellbarton, sergey Differential Revision: https://developer.blender.org/D4407
This commit is contained in:
@@ -95,7 +95,7 @@ static Mesh *doBiscetOnMirrorPlane(
|
||||
&(struct BMeshCreateParams){0},
|
||||
&(struct BMeshFromMeshParams){
|
||||
.calc_face_normal = true,
|
||||
.cd_mask_extra = CD_MASK_ORIGINDEX,
|
||||
.cd_mask_extra = {.vmask=CD_MASK_ORIGINDEX, .emask=CD_MASK_ORIGINDEX, .pmask=CD_MASK_ORIGINDEX},
|
||||
});
|
||||
|
||||
/* Define bisecting plane (aka mirror plane). */
|
||||
@@ -122,7 +122,7 @@ static Mesh *doBiscetOnMirrorPlane(
|
||||
}
|
||||
}
|
||||
|
||||
result = BKE_mesh_from_bmesh_for_eval_nomain(bm, 0);
|
||||
result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL);
|
||||
BM_mesh_free(bm);
|
||||
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user