Fix T85048: Cycles sculpt vertex color issues after recent changes

Attribute fields were not fully copied.

Ref D10208
This commit is contained in:
Brecht Van Lommel
2021-01-26 15:14:29 +01:00
parent 26b5760d6d
commit c51a5b204c

View File

@@ -661,15 +661,8 @@ void AttributeSet::update(AttributeSet &&new_attributes)
{ {
/* add or update old_attributes based on the new_attributes */ /* add or update old_attributes based on the new_attributes */
foreach (Attribute &attr, new_attributes.attributes) { foreach (Attribute &attr, new_attributes.attributes) {
Attribute *nattr = nullptr; Attribute *nattr = add(attr.name, attr.type, attr.element);
nattr->std = attr.std;
if (attr.std != ATTR_STD_NONE) {
nattr = add(attr.std, attr.name);
}
else {
nattr = add(attr.name, attr.type, attr.element);
}
nattr->set_data_from(std::move(attr)); nattr->set_data_from(std::move(attr));
} }