Curves: Avoid unnecessarily initializing new positions layer

When creating a curves data-block, one is expected to set the new
position values. We can slightly improve performance by avoiding
doing that redundantly.

Similar to cccc6d6905.
This commit is contained in:
Hans Goudey 2022-08-30 16:49:24 -05:00
parent 4c91c24bc7
commit d94a11ed79
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ CurvesGeometry::CurvesGeometry(const int point_num, const int curve_num)
CustomData_add_layer_named(&this->point_data,
CD_PROP_FLOAT3,
CD_SET_DEFAULT,
CD_CONSTRUCT,
nullptr,
this->point_num,
ATTR_POSITION.c_str());