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
Notes: blender-bot 2023-02-14 00:09:06 +01:00
Referenced by issue #85048, Cycles Sculpt Vertex Color crash or wrong render
1 changed files with 2 additions and 9 deletions

View File

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