Cleanup: Use const arguments to sculpt "get" functions
This commit is contained in:
@@ -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<uint8_t *>(SCULPT_vertex_attr_get(vertex, ss->attrs.topology_island_key));
|
||||
|
||||
@@ -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);
|
||||
|
||||
/** \} */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user