Sculpt dyntopo: remove debug ATTR_NO_OPT's

This commit is contained in:
Joseph Eagar 2021-08-17 00:31:04 -07:00
parent 954aa88ba4
commit 83f94ebb6f
5 changed files with 49 additions and 54 deletions

View File

@ -277,19 +277,19 @@ static BMVert *bm_vert_hash_lookup_chain(GHash *deleted_verts, BMVert *v)
}
}
ATTR_NO_OPT static void pbvh_bmesh_copy_facedata(BMesh *bm, BMFace *dest, BMFace *src)
static void pbvh_bmesh_copy_facedata(BMesh *bm, BMFace *dest, BMFace *src)
{
dest->head.hflag = src->head.hflag;
dest->mat_nr = src->mat_nr;
CustomData_bmesh_copy_data(&bm->pdata, &bm->pdata, src->head.data, &dest->head.data);
}
ATTR_NO_OPT static BMVert *pbvh_bmesh_vert_create(PBVH *pbvh,
int node_index,
const float co[3],
const float no[3],
BMVert *v_example,
const int cd_vert_mask_offset)
static BMVert *pbvh_bmesh_vert_create(PBVH *pbvh,
int node_index,
const float co[3],
const float no[3],
BMVert *v_example,
const int cd_vert_mask_offset)
{
PBVHNode *node = &pbvh->nodes[node_index];

View File

@ -733,7 +733,7 @@ void BKE_pbvh_free(PBVH *pbvh)
BLI_table_gset_free(node->bm_other_verts, NULL);
}
if (node->tribuf) {
if (node->tribuf || node->tri_buffers) {
BKE_pbvh_bmesh_free_tris(pbvh, node);
}
@ -1464,10 +1464,7 @@ void pbvh_update_free_all_draw_buffers(PBVH *pbvh, PBVHNode *node)
}
}
ATTR_NO_OPT static void pbvh_update_draw_buffers(PBVH *pbvh,
PBVHNode **nodes,
int totnode,
int update_flag)
static void pbvh_update_draw_buffers(PBVH *pbvh, PBVHNode **nodes, int totnode, int update_flag)
{
CustomData *vdata;

View File

@ -68,7 +68,7 @@ Topology rake:
#include <stdio.h>
#include <stdlib.h>
ATTR_NO_OPT void pbvh_bmesh_check_nodes(PBVH *pbvh)
void pbvh_bmesh_check_nodes(PBVH *pbvh)
{
#if 0
BMVert *v;
@ -359,7 +359,7 @@ static void pbvh_bmesh_node_split(
MEM_freeN(n->layer_disp);
}
if (n->tribuf) {
if (n->tribuf || n->tri_buffers) {
BKE_pbvh_bmesh_free_tris(pbvh, n);
n->tribuf = NULL;
}
@ -451,7 +451,7 @@ static bool point_in_node(const PBVHNode *node, const float co[3])
co[1] <= node->vb.bmax[1] && co[2] >= node->vb.bmin[2] && co[2] <= node->vb.bmax[2];
}
ATTR_NO_OPT void bke_pbvh_insert_face_finalize(PBVH *pbvh, BMFace *f, const int ni)
void bke_pbvh_insert_face_finalize(PBVH *pbvh, BMFace *f, const int ni)
{
PBVHNode *node = pbvh->nodes + ni;
BM_ELEM_CD_SET_INT(f, pbvh->cd_face_node_offset, ni);
@ -499,7 +499,7 @@ ATTR_NO_OPT void bke_pbvh_insert_face_finalize(PBVH *pbvh, BMFace *f, const int
} while (l != f->l_first);
}
ATTR_NO_OPT void bke_pbvh_insert_face(PBVH *pbvh, struct BMFace *f)
void bke_pbvh_insert_face(PBVH *pbvh, struct BMFace *f)
{
int i = 0;
bool ok = false;
@ -593,7 +593,7 @@ ATTR_NO_OPT void bke_pbvh_insert_face(PBVH *pbvh, struct BMFace *f)
bke_pbvh_insert_face_finalize(pbvh, f, ni);
}
ATTR_NO_OPT static void pbvh_bmesh_regen_node_verts(PBVH *pbvh, PBVHNode *node)
static void pbvh_bmesh_regen_node_verts(PBVH *pbvh, PBVHNode *node)
{
node->flag &= ~PBVH_RebuildNodeVerts;
@ -2197,7 +2197,7 @@ static void pbvh_bmesh_join_nodes(PBVH *bvh)
n->face_vert_indices = NULL;
}
if (n->tribuf) {
if (n->tribuf || n->tri_buffers) {
BKE_pbvh_bmesh_free_tris(bvh, n);
}

View File

@ -475,7 +475,7 @@ static void bmesh_undo_on_face_kill(BMFace *f, void *userdata)
data->balance_pbvh = true;
}
ATTR_NO_OPT static void bmesh_undo_on_face_add(BMFace *f, void *userdata)
static void bmesh_undo_on_face_add(BMFace *f, void *userdata)
{
BmeshUndoData *data = (BmeshUndoData *)userdata;
// data->do_full_recalc = true;
@ -509,7 +509,7 @@ static void bmesh_undo_full_mesh(void *userdata)
data->do_full_recalc = true;
}
ATTR_NO_OPT static void bmesh_undo_on_vert_change(BMVert *v, void *userdata, void *old_customdata)
static void bmesh_undo_on_vert_change(BMVert *v, void *userdata, void *old_customdata)
{
BmeshUndoData *data = (BmeshUndoData *)userdata;
@ -551,7 +551,7 @@ ATTR_NO_OPT static void bmesh_undo_on_vert_change(BMVert *v, void *userdata, voi
}
}
ATTR_NO_OPT static void bmesh_undo_on_face_change(BMFace *f, void *userdata, void *old_customdata)
static void bmesh_undo_on_face_change(BMFace *f, void *userdata, void *old_customdata)
{
BmeshUndoData *data = (BmeshUndoData *)userdata;
@ -578,9 +578,7 @@ ATTR_NO_OPT static void bmesh_undo_on_face_change(BMFace *f, void *userdata, voi
}
}
ATTR_NO_OPT static void sculpt_undo_bmesh_restore_generic(SculptUndoNode *unode,
Object *ob,
SculptSession *ss)
static void sculpt_undo_bmesh_restore_generic(SculptUndoNode *unode, Object *ob, SculptSession *ss)
{
BmeshUndoData data = {ss->pbvh,
ss->bm,

View File

@ -689,13 +689,13 @@ GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers_build(const MPoly *mpoly,
/** \name Grid PBVH
* \{ */
ATTR_NO_OPT static void gpu_pbvh_grid_fill_index_buffers(GPU_PBVH_Buffers *buffers,
SubdivCCG *UNUSED(subdiv_ccg),
const int *UNUSED(face_sets),
const int *grid_indices,
uint visible_quad_len,
int totgrid,
int gridsize)
static void gpu_pbvh_grid_fill_index_buffers(GPU_PBVH_Buffers *buffers,
SubdivCCG *UNUSED(subdiv_ccg),
const int *UNUSED(face_sets),
const int *grid_indices,
uint visible_quad_len,
int totgrid,
int gridsize)
{
GPUIndexBufBuilder elb, elb_lines;
GPUIndexBufBuilder elb_fast, elb_lines_fast;
@ -842,17 +842,17 @@ void GPU_pbvh_grid_buffers_update_free(GPU_PBVH_Buffers *buffers,
}
/* Threaded - do not call any functions that use OpenGL calls! */
ATTR_NO_OPT void GPU_pbvh_grid_buffers_update(GPU_PBVH_Buffers *buffers,
SubdivCCG *subdiv_ccg,
CCGElem **grids,
const struct DMFlagMat *grid_flag_mats,
int *grid_indices,
int totgrid,
const int *sculpt_face_sets,
const int face_sets_color_seed,
const int face_sets_color_default,
const struct CCGKey *key,
const int update_flags)
void GPU_pbvh_grid_buffers_update(GPU_PBVH_Buffers *buffers,
SubdivCCG *subdiv_ccg,
CCGElem **grids,
const struct DMFlagMat *grid_flag_mats,
int *grid_indices,
int totgrid,
const int *sculpt_face_sets,
const int face_sets_color_seed,
const int face_sets_color_default,
const struct CCGKey *key,
const int update_flags)
{
const bool show_mask = (update_flags & GPU_PBVH_BUFFERS_SHOW_MASK) != 0 && !g_vbo_id.fast_mode;
const bool show_vcol = (update_flags & GPU_PBVH_BUFFERS_SHOW_VCOL) != 0;
@ -1615,18 +1615,18 @@ static void GPU_pbvh_bmesh_buffers_update_flat_vcol(GPU_PBVH_Buffers *buffers,
gpu_pbvh_batch_init(buffers, GPU_PRIM_TRIS);
}
ATTR_NO_OPT static void GPU_pbvh_bmesh_buffers_update_indexed(GPU_PBVH_Buffers *buffers,
BMesh *bm,
TableGSet *bm_faces,
TableGSet *bm_unique_verts,
TableGSet *bm_other_verts,
PBVHTriBuf *tribuf,
const int update_flags,
const int cd_vert_node_offset,
int face_sets_color_seed,
int face_sets_color_default,
bool flat_vcol,
short mat_nr)
static void GPU_pbvh_bmesh_buffers_update_indexed(GPU_PBVH_Buffers *buffers,
BMesh *bm,
TableGSet *bm_faces,
TableGSet *bm_unique_verts,
TableGSet *bm_other_verts,
PBVHTriBuf *tribuf,
const int update_flags,
const int cd_vert_node_offset,
int face_sets_color_seed,
int face_sets_color_default,
bool flat_vcol,
short mat_nr)
{
bool active_vcol_only = g_vbo_id.active_vcol_only;