diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-03-07 13:13:40 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-03-07 13:29:50 +0300 |
commit | ab0bc65c24bdf68c356adb2566f3669153c931ea (patch) | |
tree | 23909478874a13d84e504a905809eb211e62a9e2 /source/blender/blenkernel/BKE_mesh_runtime.h | |
parent | cee53160d2bd9067a3d43cc862ce61e36ff70454 (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/blenkernel/BKE_mesh_runtime.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh_runtime.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/source/blender/blenkernel/BKE_mesh_runtime.h b/source/blender/blenkernel/BKE_mesh_runtime.h index 4ee8995dd99..d3eb573bc2d 100644 --- a/source/blender/blenkernel/BKE_mesh_runtime.h +++ b/source/blender/blenkernel/BKE_mesh_runtime.h @@ -25,10 +25,11 @@ * This file contains access functions for the Mesh.runtime struct. */ -#include "BKE_customdata.h" /* for CustomDataMask */ +//#include "BKE_customdata.h" /* for CustomDataMask */ struct ColorBand; struct CustomData; +struct CustomData_MeshMasks; struct Depsgraph; struct KeyBlock; struct MLoop; @@ -66,50 +67,50 @@ void BKE_mesh_runtime_verttri_from_looptri( #ifdef USE_DERIVEDMESH struct DerivedMesh *mesh_get_derived_final( struct Depsgraph *depsgraph, struct Scene *scene, - struct Object *ob, CustomDataMask dataMask); + struct Object *ob, const struct CustomData_MeshMasks *dataMask); #endif struct Mesh *mesh_get_eval_final( - struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, CustomDataMask dataMask); + struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask); #ifdef USE_DERIVEDMESH struct DerivedMesh *mesh_get_derived_deform( struct Depsgraph *depsgraph, struct Scene *scene, - struct Object *ob, CustomDataMask dataMask); + struct Object *ob, const struct CustomData_MeshMasks *dataMask); #endif struct Mesh *mesh_get_eval_deform( struct Depsgraph *depsgraph, struct Scene *scene, - struct Object *ob, CustomDataMask dataMask); + struct Object *ob, const struct CustomData_MeshMasks *dataMask); struct Mesh *mesh_create_eval_final_render( struct Depsgraph *depsgraph, struct Scene *scene, - struct Object *ob, CustomDataMask dataMask); + struct Object *ob, const struct CustomData_MeshMasks *dataMask); #ifdef USE_DERIVEDMESH struct DerivedMesh *mesh_create_derived_index_render( struct Depsgraph *depsgraph, struct Scene *scene, - struct Object *ob, CustomDataMask dataMask, int index); + struct Object *ob, const struct CustomData_MeshMasks *dataMask, int index); #endif struct Mesh *mesh_create_eval_final_index_render( struct Depsgraph *depsgraph, struct Scene *scene, - struct Object *ob, CustomDataMask dataMask, int index); + struct Object *ob, const struct CustomData_MeshMasks *dataMask, int index); #ifdef USE_DERIVEDMESH struct DerivedMesh *mesh_create_derived_view( struct Depsgraph *depsgraph, struct Scene *scene, - struct Object *ob, CustomDataMask dataMask); + struct Object *ob, const struct CustomData_MeshMasks *dataMask); #endif struct Mesh *mesh_create_eval_final_view( struct Depsgraph *depsgraph, struct Scene *scene, - struct Object *ob, CustomDataMask dataMask); + struct Object *ob, const struct CustomData_MeshMasks *dataMask); struct Mesh *mesh_create_eval_no_deform( struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float (*vertCos)[3], - CustomDataMask dataMask); + const struct CustomData_MeshMasks *dataMask); struct Mesh *mesh_create_eval_no_deform_render( struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, float (*vertCos)[3], - CustomDataMask dataMask); + const struct CustomData_MeshMasks *dataMask); void BKE_mesh_runtime_eval_to_meshkey(struct Mesh *me_deformed, struct Mesh *me, struct KeyBlock *kb); |