Commit: 1c9e3209f4cc08cc06d7f870cdec18cb38e8f986 Author: Kévin Dietrich Date: Thu Nov 12 11:09:46 2020 +0100 Branches: cycles_procedural_api https://developer.blender.org/rB1c9e3209f4cc08cc06d7f870cdec18cb38e8f986
Merge branch 'master' into cycles_procedural_api =================================================================== =================================================================== diff --cc intern/cycles/blender/blender_curves.cpp index e7ba2992e75,964241e9904..2f0ffb3d16f --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@@ -855,17 -855,9 +855,18 @@@ void BlenderSync::sync_hair(BL::Depsgra hair->set_value(socket, new_hair, socket); } + hair->attributes.clear(); foreach (Attribute &attr, new_hair.attributes.attributes) { - hair->attributes.attributes.push_back(std::move(attr)); + Attribute *nattr = nullptr; + + if (attr.std != ATTR_STD_NONE) { + nattr = hair->attributes.add(attr.std, attr.name); + } + else { + nattr = hair->attributes.add(attr.name, attr.type, attr.element); + } + + nattr->set_data_from(attr); } /* tag update */ diff --cc intern/cycles/blender/blender_mesh.cpp index e66ee7c364f,e85b4ee1fc6..c477a7f82be --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@@ -1073,30 -1073,14 +1073,32 @@@ void BlenderSync::sync_mesh(BL::Depsgra mesh->set_value(socket, new_mesh, socket); } + mesh->attributes.clear(); foreach (Attribute &attr, new_mesh.attributes.attributes) { - mesh->attributes.attributes.push_back(std::move(attr)); + Attribute *nattr = nullptr; + + if (attr.std != ATTR_STD_NONE) { + nattr = mesh->attributes.add(attr.std, attr.name); + } + else { + nattr = mesh->attributes.add(attr.name, attr.type, attr.element); + } + + nattr->set_data_from(attr); } + mesh->subd_attributes.clear(); foreach (Attribute &attr, new_mesh.subd_attributes.attributes) { - mesh->subd_attributes.attributes.push_back(std::move(attr)); + Attribute *nattr = nullptr; + + if (attr.std != ATTR_STD_NONE) { + nattr = mesh->subd_attributes.add(attr.std, attr.name); + } + else { + nattr = mesh->subd_attributes.add(attr.name, attr.type, attr.element); + } + + nattr->set_data_from(attr); } mesh->set_num_subd_faces(new_mesh.get_num_subd_faces()); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs