CurvesGeometry: Add initial vertex group support #106944
@ -61,6 +61,10 @@ CurvesGeometry::CurvesGeometry(const int point_num, const int curve_num)
|
||||
CustomData_reset(&this->point_data);
|
||||
CustomData_reset(&this->curve_data);
|
||||
|
||||
/* Make sure to clear this before using the attributes API. Otherwise the vertex group accessor
|
||||
filedescriptor marked this conversation as resolved
Outdated
|
||||
* might try to read from invalid memory. */
|
||||
BLI_listbase_clear(&this->vertex_group_names);
|
||||
|
||||
this->attributes_for_write().add<float3>(
|
||||
"position", ATTR_DOMAIN_POINT, AttributeInitConstruct());
|
||||
|
||||
@ -82,8 +86,6 @@ CurvesGeometry::CurvesGeometry(const int point_num, const int curve_num)
|
||||
this->curve_offsets = nullptr;
|
||||
}
|
||||
|
||||
BLI_listbase_clear(&this->vertex_group_names);
|
||||
|
||||
/* Fill the type counts with the default so they're in a valid state. */
|
||||
this->runtime->type_counts[CURVE_TYPE_CATMULL_ROM] = curve_num;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user
Not sure this comment is really necessary, it's just the same thing as the
CustomData_reset
calls above.