diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-12-01 20:56:01 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-12-01 21:48:48 +0300 |
commit | 9afd6e7b70d5d236843480c9cad879740b2bfb0a (patch) | |
tree | 38daf607101d273e6bc18fc6dde1fc39e1c85f4b /source/blender/blenkernel/intern | |
parent | 7336af32593721429676e32b475de8e7b03e37af (diff) |
Cleanup: clarify material copying for hair and pointclouds
No functional change, just more clear this way it comes from src.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/hair.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pointcloud.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/hair.c b/source/blender/blenkernel/intern/hair.c index b8d88a039c0..4714c266d82 100644 --- a/source/blender/blenkernel/intern/hair.c +++ b/source/blender/blenkernel/intern/hair.c @@ -80,7 +80,7 @@ static void hair_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, co { Hair *hair_dst = (Hair *)id_dst; const Hair *hair_src = (const Hair *)id_src; - hair_dst->mat = MEM_dupallocN(hair_dst->mat); + hair_dst->mat = MEM_dupallocN(hair_src->mat); const eCDAllocType alloc_type = (flag & LIB_ID_COPY_CD_REFERENCE) ? CD_REFERENCE : CD_DUPLICATE; CustomData_copy(&hair_src->pdata, &hair_dst->pdata, CD_MASK_ALL, alloc_type, hair_dst->totpoint); diff --git a/source/blender/blenkernel/intern/pointcloud.cc b/source/blender/blenkernel/intern/pointcloud.cc index f8ef6eb4a54..e9b7f82b3c4 100644 --- a/source/blender/blenkernel/intern/pointcloud.cc +++ b/source/blender/blenkernel/intern/pointcloud.cc @@ -79,7 +79,7 @@ static void pointcloud_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_s { PointCloud *pointcloud_dst = (PointCloud *)id_dst; const PointCloud *pointcloud_src = (const PointCloud *)id_src; - pointcloud_dst->mat = static_cast<Material **>(MEM_dupallocN(pointcloud_dst->mat)); + pointcloud_dst->mat = static_cast<Material **>(MEM_dupallocN(pointcloud_src->mat)); const eCDAllocType alloc_type = (flag & LIB_ID_COPY_CD_REFERENCE) ? CD_REFERENCE : CD_DUPLICATE; CustomData_copy(&pointcloud_src->pdata, |