Alembic procedural: fix missing attribute update

We need to explicitely tag the Attribute and AttributeSet as modified if
we change or add/remove data. This is more of a bandaid until attributes
handling is refactored to be able to reuse routines from the Attribute
API.
This commit is contained in:
Kévin Dietrich 2021-03-11 23:51:54 +01:00
parent 62e2fdf40b
commit 7a028d5b99
1 changed files with 2 additions and 0 deletions

View File

@ -1284,6 +1284,7 @@ static void update_attributes(AttributeSet &attributes, CachedData &cached_data,
}
memcpy(attr->data(), attr_data->data(), attr_data->size());
attr->modified = true;
}
/* remove any attributes not in cached_attributes */
@ -1291,6 +1292,7 @@ static void update_attributes(AttributeSet &attributes, CachedData &cached_data,
for (it = attributes.attributes.begin(); it != attributes.attributes.end();) {
if (cached_attributes.find(&(*it)) == cached_attributes.end()) {
attributes.attributes.erase(it++);
attributes.modified = true;
continue;
}