diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-07 11:00:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-07 11:00:08 +0400 |
commit | b95e8268412eebffdf9c6b9d6ba63aab780bec06 (patch) | |
tree | e7f3f04802c33c5ef01ad2a0f8ee66a1ae6da50f /source/blender/blenkernel | |
parent | e51841cbca2ab4be47fc5dcfa36857505bb114da (diff) |
Code cleanup: remove unused functions and convert int -> bool
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_paint.h | 10 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_pbvh.h | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pbvh_bmesh.c | 3 |
4 files changed, 8 insertions, 11 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 12c4e0b8435..60c448608d7 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -126,7 +126,7 @@ typedef struct SculptSession { struct MPoly *mpoly; struct MLoop *mloop; int totvert, totpoly; - float *face_normals; + float (*face_normals)[3]; struct KeyBlock *kb; float *vmask; @@ -135,7 +135,7 @@ typedef struct SculptSession { /* BMesh for dynamic topology sculpting */ struct BMesh *bm; - int bm_smooth_shading; + bool bm_smooth_shading; /* Undo/redo log for dynamic topology sculpting */ struct BMLog *bm_log; @@ -144,13 +144,13 @@ typedef struct SculptSession { bool show_diffuse_color; /* Paiting on deformed mesh */ - int modifiers_active; /* object is deformed with some modifiers */ + bool modifiers_active; /* object is deformed with some modifiers */ float (*orig_cos)[3]; /* coords of undeformed mesh */ float (*deform_cos)[3]; /* coords of deformed mesh but without stroke displacement */ float (*deform_imats)[3][3]; /* crazyspace deformation matrices */ /* Partial redraw */ - int partial_redraw; + bool partial_redraw; /* Used to cache the render of the active texture */ unsigned int texcache_side, *texcache, texcache_actual; @@ -163,7 +163,7 @@ typedef struct SculptSession { struct StrokeCache *cache; /* last paint/sculpt stroke location */ - int last_stroke_valid; + bool last_stroke_valid; float last_stroke[3]; float average_stroke_accum[3]; diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index b6f7a2b0e1a..73ca60d40b9 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -67,8 +67,7 @@ void BKE_pbvh_build_grids(PBVH *bvh, struct CCGElem **grid_elems, struct DMGridAdjacency *gridadj, int totgrid, struct CCGKey *key, void **gridfaces, struct DMFlagMat *flagmats, unsigned int **grid_hidden); -void BKE_pbvh_build_bmesh(PBVH *bvh, struct BMesh *bm, int smooth_shading, - struct BMLog *log); +void BKE_pbvh_build_bmesh(PBVH *bvh, struct BMesh *bm, bool smooth_shading, struct BMLog *log); void BKE_pbvh_free(PBVH *bvh); void BKE_pbvh_free_layer_disp(PBVH *bvh); diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index d7ae8e30698..1189b5715bb 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -413,8 +413,7 @@ static void sculptsession_bm_to_me_update_data_only(Object *ob, bool reorder) BMIter iter; BMFace *efa; BM_ITER_MESH (efa, &iter, ss->bm, BM_FACES_OF_MESH) { - BM_elem_flag_set(efa, BM_ELEM_SMOOTH, - ss->bm_smooth_shading); + BM_elem_flag_set(efa, BM_ELEM_SMOOTH, ss->bm_smooth_shading); } if (reorder) BM_log_mesh_elems_reorder(ss->bm, ss->bm_log); diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c index 8680b3e3a4b..ae2f9b2824b 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.c +++ b/source/blender/blenkernel/intern/pbvh_bmesh.c @@ -1140,8 +1140,7 @@ void pbvh_bmesh_normals_update(PBVHNode **nodes, int totnode) /***************************** Public API *****************************/ /* Build a PBVH from a BMesh */ -void BKE_pbvh_build_bmesh(PBVH *bvh, BMesh *bm, int smooth_shading, - BMLog *log) +void BKE_pbvh_build_bmesh(PBVH *bvh, BMesh *bm, bool smooth_shading, BMLog *log) { BMIter iter; BMFace *f; |