Fix: Missing handling of dynamic instance attribute size

The attributes need to be reallocated when the size changes.

Differential Revision: https://developer.blender.org/D13390
This commit is contained in:
2021-11-30 10:59:11 -05:00
parent 2fbb52dd86
commit c822e03e2a
3 changed files with 12 additions and 0 deletions

View File

@@ -821,6 +821,12 @@ void CustomDataAttributes::reallocate(const int size)
CustomData_realloc(&data, size);
}
void CustomDataAttributes::clear()
{
CustomData_free(&data, size_);
size_ = 0;
}
bool CustomDataAttributes::foreach_attribute(const AttributeForeachCallback callback,
const AttributeDomain domain) const
{