From b6771ccaf6a547ae5463af7102fbe23a621c2bf2 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 4 Feb 2019 17:51:15 +0100 Subject: BKE_library: id_copy: More general usage of LIB_ID_COPY_LOCALIZE. Turns out most of our 'local working copy' cases can use same set of flags. Note that this commit adds LIB_ID_COPY_CACHES to all our local meshes copying, however this is no-op since that flag is unused during mesh copying... We may want to add another set of flags without that one at some point, but for now it would not be useful imho. --- source/blender/blenkernel/intern/particle_system.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'source/blender/blenkernel/intern/particle_system.c') diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 77422ca20e3..aebee71fc51 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3195,12 +3195,7 @@ static void do_hair_dynamics(ParticleSimulationData *sim) clmd_effweights = psys->clmd->sim_parms->effector_weights; psys->clmd->sim_parms->effector_weights = psys->part->effector_weights; - BKE_id_copy_ex( - NULL, &psys->hair_in_mesh->id, (ID **)&psys->hair_out_mesh, - LIB_ID_CREATE_NO_MAIN | - LIB_ID_CREATE_NO_USER_REFCOUNT | - LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW); + BKE_id_copy_ex(NULL, &psys->hair_in_mesh->id, (ID **)&psys->hair_out_mesh, LIB_ID_COPY_LOCALIZE); deformedVerts = BKE_mesh_vertexCos_get(psys->hair_out_mesh, NULL); clothModifier_do(psys->clmd, sim->depsgraph, sim->scene, sim->ob, psys->hair_in_mesh, deformedVerts); BKE_mesh_apply_vert_coords(psys->hair_out_mesh, deformedVerts); -- cgit v1.2.3