Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/overlay/overlay_sculpt.cc
- This file was moved from source/blender/draw/engines/overlay/overlay_sculpt.c.
| /* SPDX-License-Identifier: GPL-2.0-or-later | /* SPDX-License-Identifier: GPL-2.0-or-later | ||||
| * Copyright 2019 Blender Foundation. */ | * Copyright 2019 Blender Foundation. */ | ||||
| /** \file | /** \file | ||||
| * \ingroup draw_engine | * \ingroup draw_engine | ||||
| */ | */ | ||||
| #include "DRW_render.h" | #include "DRW_render.h" | ||||
| #include "draw_cache_impl.h" | #include "draw_cache_impl.h" | ||||
| #include "overlay_private.h" | #include "overlay_private.hh" | ||||
| #include "BKE_paint.h" | #include "BKE_paint.h" | ||||
| #include "BKE_pbvh.h" | #include "BKE_pbvh.h" | ||||
| #include "BKE_subdiv_ccg.h" | #include "BKE_subdiv_ccg.h" | ||||
| void OVERLAY_sculpt_cache_init(OVERLAY_Data *vedata) | void OVERLAY_sculpt_cache_init(OVERLAY_Data *vedata) | ||||
| { | { | ||||
| OVERLAY_PassList *psl = vedata->psl; | OVERLAY_PassList *psl = vedata->psl; | ||||
| Show All 31 Lines | if (!pbvh_has_mask(pbvh) && !pbvh_has_face_sets(pbvh)) { | ||||
| * is nothing to draw. */ | * is nothing to draw. */ | ||||
| return; | return; | ||||
| } | } | ||||
| if (use_pbvh) { | if (use_pbvh) { | ||||
| DRW_shgroup_call_sculpt(pd->sculpt_mask_grp, ob, false, true); | DRW_shgroup_call_sculpt(pd->sculpt_mask_grp, ob, false, true); | ||||
| } | } | ||||
| else { | else { | ||||
| sculpt_overlays = DRW_mesh_batch_cache_get_sculpt_overlays(ob->data); | sculpt_overlays = DRW_mesh_batch_cache_get_sculpt_overlays(static_cast<Mesh *>(ob->data)); | ||||
| if (sculpt_overlays) { | if (sculpt_overlays) { | ||||
| DRW_shgroup_call(pd->sculpt_mask_grp, sculpt_overlays, ob); | DRW_shgroup_call(pd->sculpt_mask_grp, sculpt_overlays, ob); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void OVERLAY_sculpt_draw(OVERLAY_Data *vedata) | void OVERLAY_sculpt_draw(OVERLAY_Data *vedata) | ||||
| { | { | ||||
| Show All 10 Lines | |||||