Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/dynamicpaint.c
| Context not available. | |||||
| { | { | ||||
| /* Init modifier */ | /* Init modifier */ | ||||
| tpmd->type = pmd->type; | tpmd->type = pmd->type; | ||||
| if ((pmd->canvas && pmd->type == MOD_DYNAMICPAINT_TYPE_CANVAS) || | if (pmd->canvas) { | ||||
| (pmd->brush && pmd->type == MOD_DYNAMICPAINT_TYPE_BRUSH)) { | dynamicPaint_createType(tpmd, MOD_DYNAMICPAINT_TYPE_CANVAS, NULL); | ||||
| dynamicPaint_createType(tpmd, pmd->type, NULL); | } | ||||
| if (pmd->brush) { | |||||
| dynamicPaint_createType(tpmd, MOD_DYNAMICPAINT_TYPE_BRUSH, NULL); | |||||
| } | } | ||||
| /* Copy data */ | /* Copy data */ | ||||
| Context not available. | |||||
| dynamicPaint_freeSurface(tpmd, tpmd->canvas->surfaces.first); | dynamicPaint_freeSurface(tpmd, tpmd->canvas->surfaces.first); | ||||
| } | } | ||||
| tpmd->canvas->active_sur = pmd->canvas->active_sur; | |||||
| /* copy existing surfaces */ | /* copy existing surfaces */ | ||||
| for (surface = pmd->canvas->surfaces.first; surface; surface = surface->next) { | for (surface = pmd->canvas->surfaces.first; surface; surface = surface->next) { | ||||
| DynamicPaintSurface *t_surface = dynamicPaint_createNewSurface(tpmd->canvas, NULL); | DynamicPaintSurface *t_surface = dynamicPaint_createNewSurface(tpmd->canvas, NULL); | ||||
| Context not available. | |||||
| BLI_strncpy(t_surface->output_name2, surface->output_name2, sizeof(t_surface->output_name2)); | BLI_strncpy(t_surface->output_name2, surface->output_name2, sizeof(t_surface->output_name2)); | ||||
| } | } | ||||
| } | } | ||||
| else if (tpmd->brush) { | if (tpmd->brush) { | ||||
| DynamicPaintBrushSettings *brush = pmd->brush, *t_brush = tpmd->brush; | DynamicPaintBrushSettings *brush = pmd->brush, *t_brush = tpmd->brush; | ||||
| t_brush->pmd = tpmd; | t_brush->pmd = tpmd; | ||||
| Context not available. | |||||