diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-31 00:27:43 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-31 00:27:43 +0300 |
commit | cccc6d6905be7ac32cbe8649faf6b17e9c9f636e (patch) | |
tree | 7f728407383fd6f63f31461282f84a594a4c7c25 /source/blender/io/alembic/intern/abc_customdata.cc | |
parent | 47d105f6ad49e395a10ff49a84ff06ad1015ee9d (diff) |
Mesh: Avoid redundant custom data layer initialization
In all these cases, it was clear that the layer values were set right
after the layer was created anyway. So there's no point in using
calloc or setting the values to zero first.
See 25237d2625078c6d for more info.
Diffstat (limited to 'source/blender/io/alembic/intern/abc_customdata.cc')
-rw-r--r-- | source/blender/io/alembic/intern/abc_customdata.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/io/alembic/intern/abc_customdata.cc b/source/blender/io/alembic/intern/abc_customdata.cc index 644990afb35..9c71944fc92 100644 --- a/source/blender/io/alembic/intern/abc_customdata.cc +++ b/source/blender/io/alembic/intern/abc_customdata.cc @@ -540,7 +540,7 @@ void read_generated_coordinates(const ICompoundProperty &prop, cd_data = CustomData_get_layer(&mesh->vdata, CD_ORCO); } else { - cd_data = CustomData_add_layer(&mesh->vdata, CD_ORCO, CD_SET_DEFAULT, nullptr, totvert); + cd_data = CustomData_add_layer(&mesh->vdata, CD_ORCO, CD_CONSTRUCT, nullptr, totvert); } float(*orcodata)[3] = static_cast<float(*)[3]>(cd_data); |