diff options
author | Bastien Montagne <bastien@blender.org> | 2020-10-07 15:27:33 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-10-07 19:05:06 +0300 |
commit | 7c9131d11eb01a70db440fac7bb3f4b3833d544a (patch) | |
tree | c7c495566a3f111c8c495f1daa207292bab9c43a /source/blender/blenkernel/intern/particle_distribute.c | |
parent | 1f50beb9f28edd2fe54d97647222ad6ee5808c1c (diff) |
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.
Diffstat (limited to 'source/blender/blenkernel/intern/particle_distribute.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_distribute.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c index fad93245a04..d5999196b60 100644 --- a/source/blender/blenkernel/intern/particle_distribute.c +++ b/source/blender/blenkernel/intern/particle_distribute.c @@ -942,7 +942,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, mesh = final_mesh; } else { - BKE_id_copy_ex(NULL, ob->data, (ID **)&mesh, LIB_ID_COPY_LOCALIZE); + mesh = (Mesh *)BKE_id_copy_ex(NULL, ob->data, NULL, LIB_ID_COPY_LOCALIZE); } BKE_mesh_tessface_ensure(mesh); @@ -990,7 +990,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, mesh = final_mesh; } else { - BKE_id_copy_ex(NULL, ob->data, (ID **)&mesh, LIB_ID_COPY_LOCALIZE); + mesh = (Mesh *)BKE_id_copy_ex(NULL, ob->data, NULL, LIB_ID_COPY_LOCALIZE); } BKE_mesh_tessface_ensure(mesh); |