Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/dynamicpaint.c
| Show First 20 Lines • Show All 2,018 Lines • ▼ Show 20 Lines | for (surface = pmd->canvas->surfaces.first; surface; surface = surface->next) { | ||||
| .mvert = mvert, | .mvert = mvert, | ||||
| .vert_normals = BKE_mesh_vertex_normals_ensure(result), | .vert_normals = BKE_mesh_vertex_normals_ensure(result), | ||||
| }; | }; | ||||
| TaskParallelSettings settings; | TaskParallelSettings settings; | ||||
| BLI_parallel_range_settings_defaults(&settings); | BLI_parallel_range_settings_defaults(&settings); | ||||
| settings.use_threading = (sData->total_points > 1000); | settings.use_threading = (sData->total_points > 1000); | ||||
| BLI_task_parallel_range( | BLI_task_parallel_range( | ||||
| 0, sData->total_points, &data, dynamic_paint_apply_surface_wave_cb, &settings); | 0, sData->total_points, &data, dynamic_paint_apply_surface_wave_cb, &settings); | ||||
| BKE_mesh_normals_tag_dirty(mesh); | BKE_mesh_normals_tag_dirty(result); | ||||
| } | } | ||||
| /* displace */ | /* displace */ | ||||
| if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE) { | if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE) { | ||||
| dynamicPaint_applySurfaceDisplace(surface, result); | dynamicPaint_applySurfaceDisplace(surface, result); | ||||
| BKE_mesh_normals_tag_dirty(mesh); | BKE_mesh_normals_tag_dirty(result); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* make a copy of mesh to use as brush data */ | /* make a copy of mesh to use as brush data */ | ||||
| else if (pmd->brush && pmd->type == MOD_DYNAMICPAINT_TYPE_BRUSH) { | else if (pmd->brush && pmd->type == MOD_DYNAMICPAINT_TYPE_BRUSH) { | ||||
| DynamicPaintRuntime *runtime_data = dynamicPaint_Modifier_runtime_ensure(pmd); | DynamicPaintRuntime *runtime_data = dynamicPaint_Modifier_runtime_ensure(pmd); | ||||
| ▲ Show 20 Lines • Show All 4,327 Lines • Show Last 20 Lines | |||||