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/python/mathutils/mathutils_bvhtree.c
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/python/mathutils/mathutils_bvhtree.c')
-rw-r--r--source/blender/python/mathutils/mathutils_bvhtree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/python/mathutils/mathutils_bvhtree.c b/source/blender/python/mathutils/mathutils_bvhtree.c
index d695e1b689d..9b972f5fc91 100644
--- a/source/blender/python/mathutils/mathutils_bvhtree.c
+++ b/source/blender/python/mathutils/mathutils_bvhtree.c
@@ -1045,7 +1045,7 @@ static Mesh *bvh_get_mesh(
{
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
/* we only need minimum mesh data for topology and vertex locations */
- CustomDataMask mask = CD_MASK_BAREMESH;
+ CustomData_MeshMasks data_masks = CD_MASK_BAREMESH;
const bool use_render = DEG_get_mode(depsgraph) == DAG_EVAL_RENDER;
*r_free_mesh = false;
@@ -1059,15 +1059,15 @@ static Mesh *bvh_get_mesh(
}
else {
*r_free_mesh = true;
- return mesh_create_eval_final_render(depsgraph, scene, ob, mask);
+ return mesh_create_eval_final_render(depsgraph, scene, ob, &data_masks);
}
}
else if (ob_eval != NULL) {
if (use_cage) {
- return mesh_get_eval_deform(depsgraph, scene, ob_eval, mask); /* ob->derivedDeform */
+ return mesh_get_eval_deform(depsgraph, scene, ob_eval, &data_masks); /* ob->derivedDeform */
}
else {
- return mesh_get_eval_final(depsgraph, scene, ob_eval, mask); /* ob->derivedFinal */
+ return mesh_get_eval_final(depsgraph, scene, ob_eval, &data_masks); /* ob->derivedFinal */
}
}
else {
@@ -1086,7 +1086,7 @@ static Mesh *bvh_get_mesh(
}
else {
*r_free_mesh = true;
- return mesh_create_eval_no_deform_render(depsgraph, scene, ob, NULL, mask);
+ return mesh_create_eval_no_deform_render(depsgraph, scene, ob, NULL, &data_masks);
}
}
else {
@@ -1097,7 +1097,7 @@ static Mesh *bvh_get_mesh(
}
else {
*r_free_mesh = true;
- return mesh_create_eval_no_deform(depsgraph, scene, ob, NULL, mask);
+ return mesh_create_eval_no_deform(depsgraph, scene, ob, NULL, &data_masks);
}
}
}