diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-01-26 17:14:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-01-26 17:32:05 +0300 |
commit | c51a5b204cc15d079dd319bd95296f5ebe4922c9 (patch) | |
tree | f7d50ed3e90ef1d4b7dd3d025059bd0006cac7c6 /intern | |
parent | 26b5760d6d75cb2bc9a1d8f8158e4982972d467f (diff) |
Fix T85048: Cycles sculpt vertex color issues after recent changes
Attribute fields were not fully copied.
Ref D10208
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/render/attribute.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp index 6a3fbb7772f..ce4ae6e4295 100644 --- a/intern/cycles/render/attribute.cpp +++ b/intern/cycles/render/attribute.cpp @@ -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)); } |