Commit: 32812c2cc2a70bee018d205586e70154faeccbf7 Author: Hans Goudey Date: Tue Jan 10 20:07:47 2023 -0500 Branches: master https://developer.blender.org/rB32812c2cc2a70bee018d205586e70154faeccbf7
Cleanup: Remove redundant mesh data mask handling Byte colors are generic attributes and are therefore included in CD_MASK_PROP_ALL. Also clarify the use of vertex groups. They always have to be propagated since they're displayed in the spreadsheet, etc. =================================================================== M source/blender/blenkernel/intern/mesh.cc M source/blender/blenkernel/intern/object_update.cc =================================================================== diff --git a/source/blender/blenkernel/intern/mesh.cc b/source/blender/blenkernel/intern/mesh.cc index f67cf7e0646..47832e669ed 100644 --- a/source/blender/blenkernel/intern/mesh.cc +++ b/source/blender/blenkernel/intern/mesh.cc @@ -517,8 +517,7 @@ static int customdata_compare( { CustomDataLayer *l1, *l2; int layer_count1 = 0, layer_count2 = 0, j; - const uint64_t cd_mask_non_generic = CD_MASK_MEDGE | CD_MASK_MPOLY | CD_MASK_PROP_BYTE_COLOR | - CD_MASK_MDEFORMVERT; + const uint64_t cd_mask_non_generic = CD_MASK_MEDGE | CD_MASK_MPOLY | CD_MASK_MDEFORMVERT; const uint64_t cd_mask_all_attr = CD_MASK_PROP_ALL | cd_mask_non_generic; const Span<MLoop> loops_1 = m1->loops(); const Span<MLoop> loops_2 = m2->loops(); diff --git a/source/blender/blenkernel/intern/object_update.cc b/source/blender/blenkernel/intern/object_update.cc index a7da1bfb5d2..5abd5188d1e 100644 --- a/source/blender/blenkernel/intern/object_update.cc +++ b/source/blender/blenkernel/intern/object_update.cc @@ -141,9 +141,9 @@ void BKE_object_handle_data_update(Depsgraph *depsgraph, Scene *scene, Object *o CustomData_MeshMasks cddata_masks = scene->customdata_mask; CustomData_MeshMasks_update(&cddata_masks, &CD_MASK_BAREMESH); /* Custom attributes should not be removed automatically. They might be used by the render - * engine or scripts. They can still be removed explicitly using geometry nodes. - * Crease can be used in generic situations with geometry nodes as well. */ - cddata_masks.vmask |= CD_MASK_PROP_ALL | CD_MASK_CREASE; + * engine or scripts. They can still be removed explicitly using geometry nodes. Crease and + * vertex groups can be used in arbitrary situations with geometry nodes as well. */ + cddata_masks.vmask |= CD_MASK_PROP_ALL | CD_MASK_CREASE | CD_MASK_MDEFORMVERT; cddata_masks.emask |= CD_MASK_PROP_ALL | CD_MASK_CREASE; cddata_masks.fmask |= CD_MASK_PROP_ALL; cddata_masks.pmask |= CD_MASK_PROP_ALL; @@ -154,12 +154,10 @@ void BKE_object_handle_data_update(Depsgraph *depsgraph, Scene *scene, Object *o #ifdef WITH_FREESTYLE cddata_masks.emask |= CD_MASK_FREESTYLE_EDGE; cddata_masks.pmask |= CD_MASK_FREESTYLE_FACE; - cddata_masks.vmask |= CD_MASK_MDEFORMVERT; #endif if (DEG_get_mode(depsgraph) == DAG_EVAL_RENDER) { /* Always compute UVs, vertex colors as orcos for render. */ - cddata_masks.lmask |= CD_MASK_PROP_FLOAT2 | CD_MASK_PROP_BYTE_COLOR; - cddata_masks.vmask |= CD_MASK_ORCO | CD_MASK_PROP_COLOR; + cddata_masks.vmask |= CD_MASK_ORCO; } makeDerivedMesh(depsgraph, scene, ob, &cddata_masks); /* was CD_MASK_BAREMESH */ break; _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs