diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-26 23:42:20 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-26 23:42:29 +0300 |
commit | 57ea827bfb28eb697b74dbc606facbc133e10fab (patch) | |
tree | 67480ee166275e5974ff844e9b1e3c16dfcc4cd0 | |
parent | 8d49a4f36ea4409b53fa571f39ae1c27c3444ff1 (diff) |
Fix: Incorrect handling for crease layers
First, there can only be one crease layer, so remove the "default name",
since apparently that's how CustomData tests for that
(see `CustomData_layertype_is_singleton`).
Second, always propagate crease data because it can be used in arbitrary
situations by geometry nodes. That also has to be done for all generic
attribute layers.
Fixes T101340, T101373
-rw-r--r-- | source/blender/blenkernel/intern/customdata.cc | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object_update.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 3acd7bb0c80..66b929d7c55 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -1869,7 +1869,7 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = { /* 29: CD_BWEIGHT */ {sizeof(MFloatProperty), "MFloatProperty", 1, nullptr, nullptr, nullptr, layerInterp_bweight}, /* 30: CD_CREASE */ - {sizeof(float), "", 0, N_("SubSurfCrease"), nullptr, nullptr, layerInterp_propFloat}, + {sizeof(float), "", 0, nullptr, nullptr, nullptr, layerInterp_propFloat}, /* 31: CD_ORIGSPACE_MLOOP */ {sizeof(OrigSpaceLoop), "OrigSpaceLoop", diff --git a/source/blender/blenkernel/intern/object_update.c b/source/blender/blenkernel/intern/object_update.c index 91170060fee..3fe8b95e656 100644 --- a/source/blender/blenkernel/intern/object_update.c +++ b/source/blender/blenkernel/intern/object_update.c @@ -141,9 +141,10 @@ 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. */ - cddata_masks.vmask |= CD_MASK_PROP_ALL; - cddata_masks.emask |= CD_MASK_PROP_ALL; + * engine or scripts. They can still be removed explicitly using geometry nodes. + * Crease can be be used in generic situations with geometry nodes as well. */ + cddata_masks.vmask |= CD_MASK_PROP_ALL | CD_MASK_CREASE; + cddata_masks.emask |= CD_MASK_PROP_ALL | CD_MASK_CREASE; cddata_masks.fmask |= CD_MASK_PROP_ALL; cddata_masks.pmask |= CD_MASK_PROP_ALL; cddata_masks.lmask |= CD_MASK_PROP_ALL; |