Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2012-01-23 20:32:11 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-01-23 20:32:11 +0400
commit6c9438ea8a34054c66690a8c5d49162d0fd9379a (patch)
treef3ab2569a90ebeeebcf8527a5aebe5f51f6c360b /source/blender/blenkernel/intern/dynamicpaint.c
parent76f03a2ee4f80b5158ffc92f7a85c4401affe6a4 (diff)
BMesh: Fix (re-enable) DynamicPaint previews in Object mode.
Also simplifies DM_update_weight_mcol: no need to update CD_WEIGHT_MCOL here, as it is anyway recreated from CD_WEIGHT_MLOOPCOL at tesselation time. Only commented out code for now.
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 0a3e928c2f6..9e30003f9c7 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1604,14 +1604,14 @@ static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData
}
/* viewport preview */
- if (0 && surface->flags & MOD_DPAINT_PREVIEW) {
+ if (surface->flags & MOD_DPAINT_PREVIEW) {
MPoly *mp = CDDM_get_polys(result);
int totpoly = result->numPolyData;
/* Save preview results to weight layer to be
* able to share same drawing methods */
- col = CustomData_get_layer(&dm->loopData, CD_WEIGHT_MLOOPCOL);
- if (!col) col = CustomData_add_layer(&dm->loopData, CD_WEIGHT_MLOOPCOL, CD_CALLOC, NULL, totloop);
+ col = CustomData_get_layer(&result->loopData, CD_WEIGHT_MLOOPCOL);
+ if (!col) col = CustomData_add_layer(&result->loopData, CD_WEIGHT_MLOOPCOL, CD_CALLOC, NULL, totloop);
if (col) {
#pragma omp parallel for schedule(static)
@@ -1703,7 +1703,7 @@ static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData
float *weight = (float*)sData->type_data;
/* viewport preview */
- if (0 && surface->flags & MOD_DPAINT_PREVIEW) {
+ if (surface->flags & MOD_DPAINT_PREVIEW) {
/* Save preview results to weight layer to be
* able to share same drawing methods */
DM_update_weight_mcol(ob, result, 0, weight, 0, NULL);