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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-03-07 13:13:40 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-03-07 13:29:50 +0300
commitab0bc65c24bdf68c356adb2566f3669153c931ea (patch)
tree23909478874a13d84e504a905809eb211e62a9e2 /source/blender/bmesh/intern/bmesh_mesh_conv.h
parentcee53160d2bd9067a3d43cc862ce61e36ff70454 (diff)
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
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh_conv.h')
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_conv.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.h b/source/blender/bmesh/intern/bmesh_mesh_conv.h
index 52d3b0b8808..30a1e8bffd5 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.h
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.h
@@ -24,6 +24,7 @@
* \ingroup bmesh
*/
+struct CustomData_MeshMasks;
struct Main;
struct Mesh;
@@ -39,7 +40,7 @@ struct BMeshFromMeshParams {
uint use_shapekey : 1;
/* define the active shape key (index + 1) */
int active_shapekey;
- int64_t cd_mask_extra;
+ struct CustomData_MeshMasks cd_mask_extra;
};
void BM_mesh_bm_from_me(
BMesh *bm, const struct Mesh *me,
@@ -49,7 +50,7 @@ ATTR_NONNULL(1, 3);
struct BMeshToMeshParams {
/** Update object hook indices & vertex parents. */
uint calc_object_remap : 1;
- int64_t cd_mask_extra;
+ struct CustomData_MeshMasks cd_mask_extra;
};
void BM_mesh_bm_to_me(
struct Main *bmain, BMesh *bm, struct Mesh *me,
@@ -57,7 +58,7 @@ void BM_mesh_bm_to_me(
ATTR_NONNULL(2, 3, 4);
void BM_mesh_bm_to_me_for_eval(
- BMesh *bm, struct Mesh *me, const int64_t cd_mask_extra)
+ BMesh *bm, struct Mesh *me, const struct CustomData_MeshMasks *cd_mask_extra)
ATTR_NONNULL(1, 2);