Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_impl_mesh.c
| Show First 20 Lines • Show All 1,314 Lines • ▼ Show 20 Lines | #endif | ||||
| /* TODO(pablodp606): This always updates the sculpt normals for regular drawing (non-PBVH). | /* TODO(pablodp606): This always updates the sculpt normals for regular drawing (non-PBVH). | ||||
| * This makes tools that sample the surface per step get wrong normals until a redraw happens. | * This makes tools that sample the surface per step get wrong normals until a redraw happens. | ||||
| * Normal updates should be part of the brush loop and only run during the stroke when the | * Normal updates should be part of the brush loop and only run during the stroke when the | ||||
| * brush needs to sample the surface. The drawing code should only update the normals | * brush needs to sample the surface. The drawing code should only update the normals | ||||
| * per redraw when smooth shading is enabled. */ | * per redraw when smooth shading is enabled. */ | ||||
| const bool do_update_sculpt_normals = ob->sculpt && ob->sculpt->pbvh; | const bool do_update_sculpt_normals = ob->sculpt && ob->sculpt->pbvh; | ||||
| if (do_update_sculpt_normals) { | if (do_update_sculpt_normals) { | ||||
| Mesh *mesh = ob->data; | Mesh *mesh = ob->data; | ||||
| BKE_pbvh_update_normals(ob->sculpt->pbvh, mesh->runtime.subdiv_ccg); | BKE_pbvh_update_normals(ob->sculpt->pbvh, mesh->runtime.subdiv_ccg, ob->sculpt->pmap); | ||||
| } | } | ||||
| cache->batch_ready |= batch_requested; | cache->batch_ready |= batch_requested; | ||||
| const bool do_cage = (is_editmode && | const bool do_cage = (is_editmode && | ||||
| (me->edit_mesh->mesh_eval_final != me->edit_mesh->mesh_eval_cage)); | (me->edit_mesh->mesh_eval_final != me->edit_mesh->mesh_eval_cage)); | ||||
| const bool do_uvcage = is_editmode && !me->edit_mesh->mesh_eval_final->runtime.is_original; | const bool do_uvcage = is_editmode && !me->edit_mesh->mesh_eval_final->runtime.is_original; | ||||
| ▲ Show 20 Lines • Show All 257 Lines • Show Last 20 Lines | |||||