diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-09-10 12:18:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-09-10 12:29:45 +0300 |
commit | a00507c482e28ad20813f082057d4a09061c03cc (patch) | |
tree | 20de1467b6cb3dd39b9da65d0661e1b128e617ef /source/blender/blenloader | |
parent | fe4286435c54b3ba0a031f032b95615da74a7aac (diff) |
Templates: remove masking layers from the default startup file
Remove sculpt mask layer from the default cube, added in
444934632a8d8e239bc0c6d79a638ec0943152a6.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index 82c577d11a0..ae0dbb7f808 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -52,6 +52,7 @@ #include "BKE_brush.h" #include "BKE_colortools.h" #include "BKE_curveprofile.h" +#include "BKE_customdata.h" #include "BKE_gpencil.h" #include "BKE_layer.h" #include "BKE_lib_id.h" @@ -552,6 +553,11 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template) mesh->flag |= ME_REMESH_FIX_POLES | ME_REMESH_REPROJECT_VOLUME; BKE_mesh_smooth_flag_set(mesh, false); } + else { + /* Remove sculpt-mask data in default mesh objects for all non-sculpt templates. */ + CustomData_free_layers(&mesh->vdata, CD_PAINT_MASK, mesh->totvert); + CustomData_free_layers(&mesh->ldata, CD_GRID_PAINT_MASK, mesh->totloop); + } } for (Camera *camera = bmain->cameras.first; camera; camera = camera->id.next) { |