Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-23 03:20:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-23 03:20:48 +0400
commit04ea8c0ee87e7a110d323e92116faaff20070854 (patch)
treecd3c44364ef759bb98a961d575b5e4a6343bdd28 /source/blender/blenkernel
parentb7bf20d9504127ec7c3d52bc8a1448d4a2bdc3bf (diff)
remove the pointer from BLI_bitmap's typedef,
hides that an arg passed is really an array which may be modified by other functions.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_pbvh.h2
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c4
-rw-r--r--source/blender/blenkernel/intern/multires.c34
-rw-r--r--source/blender/blenkernel/intern/pbvh.c8
-rw-r--r--source/blender/blenkernel/intern/pbvh_intern.h4
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c4
6 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index 48c16f8db38..7d3d8d7dcbd 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -223,7 +223,7 @@ typedef struct PBVHVertexIter {
struct CCGElem **grids;
struct CCGElem *grid;
struct CCGKey *key;
- BLI_bitmap *grid_hidden, gh;
+ BLI_bitmap **grid_hidden, *gh;
int *grid_indices;
int totgrid;
int gridsize;
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index c9fc5f15d8b..01bfe1f7ada 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -2190,7 +2190,7 @@ void BKE_editmesh_statvis_calc(BMEditMesh *em, DerivedMesh *dm,
struct CageUserData {
int totvert;
float (*cos_cage)[3];
- BLI_bitmap visit_bitmap;
+ BLI_bitmap *visit_bitmap;
};
static void cage_mapped_verts_callback(void *userData, int index, const float co[3],
@@ -2207,7 +2207,7 @@ static void cage_mapped_verts_callback(void *userData, int index, const float co
float (*BKE_editmesh_vertexCos_get(BMEditMesh *em, Scene *scene, int *r_numVerts))[3]
{
DerivedMesh *cage, *final;
- BLI_bitmap visit_bitmap;
+ BLI_bitmap *visit_bitmap;
struct CageUserData data;
float (*cos_cage)[3];
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index cba4c9206c9..95bf56d00f2 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -105,15 +105,15 @@ void multires_customdata_delete(Mesh *me)
}
/** Grid hiding **/
-static BLI_bitmap multires_mdisps_upsample_hidden(BLI_bitmap lo_hidden,
- int lo_level,
- int hi_level,
+static BLI_bitmap *multires_mdisps_upsample_hidden(BLI_bitmap *lo_hidden,
+ int lo_level,
+ int hi_level,
- /* assumed to be at hi_level (or
- * null) */
- BLI_bitmap prev_hidden)
+ /* assumed to be at hi_level (or
+ * null) */
+ BLI_bitmap *prev_hidden)
{
- BLI_bitmap subd;
+ BLI_bitmap *subd;
int hi_gridsize = ccg_gridsize(hi_level);
int lo_gridsize = ccg_gridsize(lo_level);
int yh, xh, xl, yl, xo, yo, hi_ndx;
@@ -168,11 +168,11 @@ static BLI_bitmap multires_mdisps_upsample_hidden(BLI_bitmap lo_hidden,
return subd;
}
-static BLI_bitmap multires_mdisps_downsample_hidden(BLI_bitmap old_hidden,
- int old_level,
- int new_level)
+static BLI_bitmap *multires_mdisps_downsample_hidden(BLI_bitmap *old_hidden,
+ int old_level,
+ int new_level)
{
- BLI_bitmap new_hidden;
+ BLI_bitmap *new_hidden;
int new_gridsize = ccg_gridsize(new_level);
int old_gridsize = ccg_gridsize(old_level);
int x, y, factor, old_value;
@@ -200,7 +200,7 @@ static void multires_output_hidden_to_ccgdm(CCGDerivedMesh *ccgdm,
Mesh *me, int level)
{
const MDisps *mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
- BLI_bitmap *grid_hidden = ccgdm->gridHidden;
+ BLI_bitmap **grid_hidden = ccgdm->gridHidden;
int *gridOffset;
int i, j;
@@ -210,7 +210,7 @@ static void multires_output_hidden_to_ccgdm(CCGDerivedMesh *ccgdm,
for (j = 0; j < me->mpoly[i].totloop; j++) {
int g = gridOffset[i] + j;
const MDisps *md = &mdisps[g];
- BLI_bitmap gh = md->hidden;
+ BLI_bitmap *gh = md->hidden;
if (gh) {
grid_hidden[g] =
@@ -224,7 +224,7 @@ static void multires_output_hidden_to_ccgdm(CCGDerivedMesh *ccgdm,
* the current level of md.hidden) */
static void multires_mdisps_subdivide_hidden(MDisps *md, int new_level)
{
- BLI_bitmap subd;
+ BLI_bitmap *subd;
BLI_assert(md->hidden);
@@ -647,7 +647,7 @@ static void multires_del_higher(MultiresModifierData *mmd, Object *ob, int lvl)
multires_copy_grid(ndisps, hdisps, nsize, hsize);
if (mdisp->hidden) {
- BLI_bitmap gh =
+ BLI_bitmap *gh =
multires_mdisps_downsample_hidden(mdisp->hidden,
mdisp->level,
lvl);
@@ -1251,7 +1251,7 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm)
void multires_modifier_update_hidden(DerivedMesh *dm)
{
CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)dm;
- BLI_bitmap *grid_hidden = ccgdm->gridHidden;
+ BLI_bitmap **grid_hidden = ccgdm->gridHidden;
Mesh *me = ccgdm->multires.ob->data;
MDisps *mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
int totlvl = ccgdm->multires.totlvl;
@@ -1262,7 +1262,7 @@ void multires_modifier_update_hidden(DerivedMesh *dm)
for (i = 0; i < me->totloop; i++) {
MDisps *md = &mdisps[i];
- BLI_bitmap gh = grid_hidden[i];
+ BLI_bitmap *gh = grid_hidden[i];
if (!gh && md->hidden) {
MEM_freeN(md->hidden);
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 99e6e898685..a0cc37dcf3f 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -538,7 +538,7 @@ void BKE_pbvh_build_mesh(PBVH *bvh, MFace *faces, MVert *verts, int totface, int
/* Do a full rebuild with on Grids data structure */
void BKE_pbvh_build_grids(PBVH *bvh, CCGElem **grids, DMGridAdjacency *gridadj,
- int totgrid, CCGKey *key, void **gridfaces, DMFlagMat *flagmats, BLI_bitmap *grid_hidden)
+ int totgrid, CCGKey *key, void **gridfaces, DMFlagMat *flagmats, BLI_bitmap **grid_hidden)
{
BBC *prim_bbc = NULL;
BB cb;
@@ -1253,7 +1253,7 @@ void BKE_pbvh_bounding_box(const PBVH *bvh, float min[3], float max[3])
}
}
-BLI_bitmap *BKE_pbvh_grid_hidden(const PBVH *bvh)
+BLI_bitmap **BKE_pbvh_grid_hidden(const PBVH *bvh)
{
BLI_assert(bvh->type == PBVH_GRIDS);
return bvh->grid_hidden;
@@ -1469,7 +1469,7 @@ static int pbvh_grids_node_raycast(PBVH *bvh, PBVHNode *node,
for (i = 0; i < totgrid; ++i) {
CCGElem *grid = bvh->grids[node->prim_indices[i]];
- BLI_bitmap gh;
+ BLI_bitmap *gh;
if (!grid)
continue;
@@ -1664,7 +1664,7 @@ void BKE_pbvh_draw(PBVH *bvh, float (*planes)[4], float (*face_nors)[3],
}
void BKE_pbvh_grids_update(PBVH *bvh, CCGElem **grids, DMGridAdjacency *gridadj, void **gridfaces,
- DMFlagMat *flagmats, BLI_bitmap *grid_hidden)
+ DMFlagMat *flagmats, BLI_bitmap **grid_hidden)
{
int a;
diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h
index b3f7bf6e3d1..4154b8e4799 100644
--- a/source/blender/blenkernel/intern/pbvh_intern.h
+++ b/source/blender/blenkernel/intern/pbvh_intern.h
@@ -139,11 +139,11 @@ struct PBVH {
void **gridfaces;
const DMFlagMat *grid_flag_mats;
int totgrid;
- BLI_bitmap *grid_hidden;
+ BLI_bitmap **grid_hidden;
/* Only used during BVH build and update,
* don't need to remain valid after */
- BLI_bitmap vert_bitmap;
+ BLI_bitmap *vert_bitmap;
#ifdef PERFCNTRS
int perf_modified;
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 7c5727b0f69..cc33727030a 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -2930,7 +2930,7 @@ static void ccgdm_create_grids(DerivedMesh *dm)
gridFaces = MEM_mallocN(sizeof(CCGFace *) * numGrids, "ccgdm.gridFaces");
gridFlagMats = MEM_mallocN(sizeof(DMFlagMat) * numGrids, "ccgdm.gridFlagMats");
- ccgdm->gridHidden = MEM_callocN(sizeof(BLI_bitmap) * numGrids, "ccgdm.gridHidden");
+ ccgdm->gridHidden = MEM_callocN(sizeof(*ccgdm->gridHidden) * numGrids, "ccgdm.gridHidden");
for (gIndex = 0, index = 0; index < numFaces; index++) {
CCGFace *f = ccgdm->faceMap[index].face;
@@ -3002,7 +3002,7 @@ static DMFlagMat *ccgDM_getGridFlagMats(DerivedMesh *dm)
return ccgdm->gridFlagMats;
}
-static BLI_bitmap *ccgDM_getGridHidden(DerivedMesh *dm)
+static BLI_bitmap **ccgDM_getGridHidden(DerivedMesh *dm)
{
CCGDerivedMesh *ccgdm = (CCGDerivedMesh *)dm;