[Bf-blender-cvs] [0411cfe] master: Fix T48373: Crash when using dynamic paint with brush material.
Bastien Montagne
noreply at git.blender.org
Sun May 8 11:43:28 CEST 2016
Commit: 0411cfea9d8bfcad6271ccec51bc9a9c641c798c
Author: Bastien Montagne
Date: Sun May 8 11:39:45 2016 +0200
Branches: master
https://developer.blender.org/rB0411cfea9d8bfcad6271ccec51bc9a9c641c798c
Fix T48373: Crash when using dynamic paint with brush material.
`dynamicPaint_doMaterialTex` was called from inside an omp parallel section with brush->dm
itself, and not the local dm copy. Generating looptri data is not thread safe at all...
===================================================================
M source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index dbf095d..0da2bb0 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -3466,8 +3466,11 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
sampleColor[2] = brush->b;
/* Get material+textures color on hit point if required */
- if (brush_usesMaterial(brush, scene))
- dynamicPaint_doMaterialTex(bMats, sampleColor, &alpha_factor, brushOb, bData->realCoord[bData->s_pos[index] + ss].v, hitCoord, hitTri, brush->dm);
+ if (brush_usesMaterial(brush, scene)) {
+ dynamicPaint_doMaterialTex(bMats, sampleColor, &alpha_factor, brushOb,
+ bData->realCoord[bData->s_pos[index] + ss].v,
+ hitCoord, hitTri, dm);
+ }
/* Sample proximity colorband if required */
if ((hit_found == HIT_PROXIMITY) && (brush->proximity_falloff == MOD_DPAINT_PRFALL_RAMP)) {
More information about the Bf-blender-cvs
mailing list