From 146b0c6b04920efd3582660f6b5e409613e70b25 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 20 Aug 2017 17:16:58 +0200 Subject: Fix T52439: Crash after adjusting lenght of hair particles. Regression from rBfed853ea78221, calling this inside thread worker was not really good idea anyway, and we already have all the code we need in pre-threading init function, was just disabled for vertex particles before. To be backported to 2.79. --- source/blender/blenkernel/intern/particle_distribute.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source/blender/blenkernel/intern/particle_distribute.c') diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c index 4f758bde7f9..ac9c60e8999 100644 --- a/source/blender/blenkernel/intern/particle_distribute.c +++ b/source/blender/blenkernel/intern/particle_distribute.c @@ -429,7 +429,6 @@ static void distribute_from_verts_exec(ParticleTask *thread, ParticleData *pa, i ParticleThreadContext *ctx= thread->ctx; MFace *mface; - DM_ensure_tessface(ctx->dm); mface = ctx->dm->getTessFaceDataArray(ctx->dm, CD_MFACE); int rng_skip_tot = PSYS_RND_DIST_SKIP; /* count how many rng_* calls wont need skipping */ @@ -899,10 +898,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti else dm= CDDM_from_mesh((Mesh*)ob->data); - /* BMESH ONLY, for verts we don't care about tessfaces */ - if (from != PART_FROM_VERT) { - DM_ensure_tessface(dm); - } + DM_ensure_tessface(dm); /* we need orco for consistent distributions */ if (!CustomData_has_layer(&dm->vertData, CD_ORCO)) -- cgit v1.2.3