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/collada
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/collada')
-rw-r--r--source/blender/collada/MeshImporter.cpp2
-rw-r--r--source/blender/collada/collada_utils.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index 65ce7ba5677..306120e464f 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -556,7 +556,7 @@ void MeshImporter::mesh_add_edges(Mesh *mesh, int len)
totedge = mesh->totedge + len;
/* update customdata */
- CustomData_copy(&mesh->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge);
+ CustomData_copy(&mesh->edata, &edata, CD_MASK_MESH.emask, CD_DEFAULT, totedge);
CustomData_copy_data(&mesh->edata, &edata, 0, 0, mesh->totedge);
if (!CustomData_has_layer(&edata, CD_MEDGE))
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 406d4dabc88..37a4608fe29 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -256,19 +256,19 @@ Mesh *bc_get_mesh_copy(
bool apply_modifiers,
bool triangulate)
{
- CustomDataMask mask = CD_MASK_MESH;
+ CustomData_MeshMasks mask = CD_MASK_MESH;
Mesh *tmpmesh = NULL;
if (apply_modifiers) {
#if 0 /* Not supported by new system currently... */
switch (export_mesh_type) {
case BC_MESH_TYPE_VIEW:
{
- dm = mesh_create_derived_view(depsgraph, scene, ob, mask);
+ dm = mesh_create_derived_view(depsgraph, scene, ob, &mask);
break;
}
case BC_MESH_TYPE_RENDER:
{
- dm = mesh_create_derived_render(depsgraph, scene, ob, mask);
+ dm = mesh_create_derived_render(depsgraph, scene, ob, &mask);
break;
}
}
@@ -276,7 +276,7 @@ Mesh *bc_get_mesh_copy(
Depsgraph *depsgraph = blender_context.get_depsgraph();
Scene *scene_eval = blender_context.get_evaluated_scene();
Object *ob_eval = blender_context.get_evaluated_object(ob);
- tmpmesh = mesh_get_eval_final(depsgraph, scene_eval, ob_eval, mask);
+ tmpmesh = mesh_get_eval_final(depsgraph, scene_eval, ob_eval, &mask);
#endif
}
else {