diff --git a/source/blender/editors/sculpt_paint/sculpt.cc b/source/blender/editors/sculpt_paint/sculpt.cc index cc1d99ea167..f6358717b0a 100644 --- a/source/blender/editors/sculpt_paint/sculpt.cc +++ b/source/blender/editors/sculpt_paint/sculpt.cc @@ -120,7 +120,7 @@ void SCULPT_vertex_random_access_ensure(SculptSession *ss) } } -int SCULPT_vertex_count_get(SculptSession *ss) +int SCULPT_vertex_count_get(const SculptSession *ss) { switch (BKE_pbvh_type(ss->pbvh)) { case PBVH_FACES: @@ -134,7 +134,7 @@ int SCULPT_vertex_count_get(SculptSession *ss) return 0; } -const float *SCULPT_vertex_co_get(SculptSession *ss, PBVHVertRef vertex) +const float *SCULPT_vertex_co_get(const SculptSession *ss, PBVHVertRef vertex) { switch (BKE_pbvh_type(ss->pbvh)) { case PBVH_FACES: { @@ -190,7 +190,7 @@ void SCULPT_vertex_color_set(SculptSession *ss, PBVHVertRef vertex, const float BKE_pbvh_vertex_color_set(ss->pbvh, vertex, color); } -void SCULPT_vertex_normal_get(SculptSession *ss, PBVHVertRef vertex, float no[3]) +void SCULPT_vertex_normal_get(const SculptSession *ss, PBVHVertRef vertex, float no[3]) { switch (BKE_pbvh_type(ss->pbvh)) { case PBVH_FACES: { @@ -377,7 +377,7 @@ int SCULPT_active_face_set_get(SculptSession *ss) return SCULPT_FACE_SET_NONE; } -bool SCULPT_vertex_visible_get(SculptSession *ss, PBVHVertRef vertex) +bool SCULPT_vertex_visible_get(const SculptSession *ss, PBVHVertRef vertex) { switch (BKE_pbvh_type(ss->pbvh)) { case PBVH_FACES: { @@ -6258,7 +6258,7 @@ void SCULPT_face_set_set(SculptSession *ss, PBVHFaceRef face, int fset) } } -int SCULPT_vertex_island_get(SculptSession *ss, PBVHVertRef vertex) +int SCULPT_vertex_island_get(const SculptSession *ss, PBVHVertRef vertex) { if (ss->attrs.topology_island_key) { return *static_cast(SCULPT_vertex_attr_get(vertex, ss->attrs.topology_island_key)); diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.hh b/source/blender/editors/sculpt_paint/sculpt_intern.hh index c1843899663..c08eb5ccdd0 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.hh +++ b/source/blender/editors/sculpt_paint/sculpt_intern.hh @@ -851,11 +851,11 @@ bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass(StrokeCache *cache); /** Ensure random access; required for PBVH_BMESH */ void SCULPT_vertex_random_access_ensure(SculptSession *ss); -int SCULPT_vertex_count_get(SculptSession *ss); -const float *SCULPT_vertex_co_get(SculptSession *ss, PBVHVertRef vertex); +int SCULPT_vertex_count_get(const SculptSession *ss); +const float *SCULPT_vertex_co_get(const SculptSession *ss, PBVHVertRef vertex); /** Get the normal for a given sculpt vertex; do not modify the result */ -void SCULPT_vertex_normal_get(SculptSession *ss, PBVHVertRef vertex, float no[3]); +void SCULPT_vertex_normal_get(const SculptSession *ss, PBVHVertRef vertex, float no[3]); float SCULPT_vertex_mask_get(SculptSession *ss, PBVHVertRef vertex); void SCULPT_vertex_color_get(const SculptSession *ss, PBVHVertRef vertex, float r_color[4]); @@ -951,7 +951,7 @@ bool SCULPT_vertex_is_boundary(const SculptSession *ss, PBVHVertRef vertex); /** \name Sculpt Visibility API * \{ */ -bool SCULPT_vertex_visible_get(SculptSession *ss, PBVHVertRef vertex); +bool SCULPT_vertex_visible_get(const SculptSession *ss, PBVHVertRef vertex); bool SCULPT_vertex_all_faces_visible_get(const SculptSession *ss, PBVHVertRef vertex); bool SCULPT_vertex_any_face_visible_get(SculptSession *ss, PBVHVertRef vertex); @@ -1790,7 +1790,7 @@ void SCULPT_topology_islands_ensure(Object *ob); void SCULPT_topology_islands_invalidate(SculptSession *ss); /** Get vertex island key. */ -int SCULPT_vertex_island_get(SculptSession *ss, PBVHVertRef vertex); +int SCULPT_vertex_island_get(const SculptSession *ss, PBVHVertRef vertex); /** \} */