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:
@@ -515,7 +515,7 @@ static Mesh *normalEditModifier_do(NormalEditModifierData *enmd,
|
||||
/* We need to duplicate data here, otherwise setting custom normals
|
||||
* (which may also affect sharp edges) could
|
||||
* modify original mesh, see T43671. */
|
||||
BKE_id_copy_ex(NULL, &mesh->id, (ID **)&result, LIB_ID_COPY_LOCALIZE);
|
||||
result = (Mesh *)BKE_id_copy_ex(NULL, &mesh->id, NULL, LIB_ID_COPY_LOCALIZE);
|
||||
}
|
||||
else {
|
||||
result = mesh;
|
||||
|
||||
Reference in New Issue
Block a user