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 00:05:26 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-01-23 00:05:26 +0400
commit6eb0ca9385aaf69c89172a5826592e5ad9dac198 (patch)
treec9262f0272a3d566077436958400cfe72ebf8461 /source/blender/blenkernel/intern/dynamicpaint.c
parentb54182c93fac2bd79d0c9244eaf1d553b93adcb0 (diff)
parent1a93d8834319b890ff0cbc70231b14635603ae95 (diff)
Merged with trunk (-r43609:43611): updated modifier preview.
Noted preview code for DynamicPaint is currently disabled, will see if I can re-enable it…
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index b8d44a07051..d5d1afef954 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1574,7 +1574,6 @@ static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData
DynamicPaintSurface *surface = pmd->canvas->surfaces.first;
int update_normals = 0;
- pmd->canvas->flags &= ~MOD_DPAINT_PREVIEW_READY;
/* loop through surfaces */
for (; surface; surface=surface->next) {
@@ -1655,7 +1654,6 @@ static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData
}
}
}
- pmd->canvas->flags |= MOD_DPAINT_PREVIEW_READY;
}
}
@@ -1711,24 +1709,7 @@ static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData
if (0 && surface->flags & MOD_DPAINT_PREVIEW) {
/* Save preview results to weight layer to be
* able to share same drawing methods */
- int i;
- MLoopCol *col = CustomData_get_layer(&dm->loopData, CD_WEIGHT_MLOOPCOL);
- if (!col) col = CustomData_add_layer(&dm->loopData, CD_WEIGHT_MLOOPCOL, CD_CALLOC, NULL, totloop);
-
- if (col) {
- printf("doint weight preview\n");
- #pragma omp parallel for schedule(static)
- for (i=0; i<totloop; i++) {
- float temp_color[3];
- weight_to_rgb(temp_color, weight[mloop[i].v]);
-
- col[i].a = 255;
- col[i].r = FTOCHAR(temp_color[2]);
- col[i].g = FTOCHAR(temp_color[1]);
- col[i].b = FTOCHAR(temp_color[0]);
- }
- pmd->canvas->flags |= MOD_DPAINT_PREVIEW_READY;
- }
+ DM_update_weight_mcol(ob, result, 0, weight, 0, NULL);
}
/* apply weights into a vertex group, if doesnt exists add a new layer */