[Bf-blender-cvs] [146b0c6b049] master: Fix T52439: Crash after adjusting lenght of hair particles.

Bastien Montagne noreply at git.blender.org
Sun Aug 20 17:19:16 CEST 2017


Commit: 146b0c6b04920efd3582660f6b5e409613e70b25
Author: Bastien Montagne
Date:   Sun Aug 20 17:16:58 2017 +0200
Branches: master
https://developer.blender.org/rB146b0c6b04920efd3582660f6b5e409613e70b25

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.

===================================================================

M	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))



More information about the Bf-blender-cvs mailing list