forked from bartvdbraak/blender
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:
parent
62e2fdf40b
commit
7a028d5b99
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user