Refactor BKE_id_copy_ex to return the new ID pointer.

Note that possibility to pass the new ID pointer as parameter was kept,
as this is needed for some rather specific cases (like in depsgraph/COW,
when copying into already allocated memory).

Part of T71219.
This commit is contained in:
2020-10-07 14:27:33 +02:00
parent 1f50beb9f2
commit 7c9131d11e
28 changed files with 101 additions and 101 deletions

View File

@@ -754,7 +754,7 @@ static bool remap_hair_emitter(Depsgraph *depsgraph,
return false;
}
/* don't modify the original vertices */
BKE_id_copy_ex(NULL, &mesh->id, (ID **)&mesh, LIB_ID_COPY_LOCALIZE);
mesh = (Mesh *)BKE_id_copy_ex(NULL, &mesh->id, NULL, LIB_ID_COPY_LOCALIZE);
/* BMESH_ONLY, deform dm may not have tessface */
BKE_mesh_tessface_ensure(mesh);