diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-03-12 18:46:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-03-12 18:49:47 +0400 |
commit | 35ed7486c76f11b397d0ff131160f8629af3b49b (patch) | |
tree | 1123cfb238a415954337c01c41a2d86e1aa20603 /source | |
parent | 5bceb00a61f1cd98c049cc11931550acf08426c7 (diff) |
Mesh API: rename 'octree' to 'spatial' since internally its using kdtree
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/armature/armature_skinning.c | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 22 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_shapekey.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 6 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/ed_util.c | 4 | ||||
-rw-r--r-- | source/blenderplayer/bad_level_call_stubs/stubs.c | 4 |
10 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c index 7ec0acf12d1..8628627f1a7 100644 --- a/source/blender/editors/armature/armature_skinning.c +++ b/source/blender/editors/armature/armature_skinning.c @@ -403,7 +403,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, } /* only generated in some cases but can call anyway */ - mesh_octree_table(ob, NULL, NULL, 'e'); + ED_mesh_mirror_spatial_table(ob, NULL, NULL, 'e'); /* free the memory allocated */ MEM_freeN(bonelist); diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 2d7e558ae70..6c07e5eeec7 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -301,8 +301,8 @@ int join_mesh_exec(struct bContext *C, struct wmOperator *op); int join_mesh_shapes_exec(struct bContext *C, struct wmOperator *op); /* mirror lookup api */ -int mesh_octree_table(struct Object *ob, struct BMEditMesh *em, const float co[3], char mode); -int mesh_mirrtopo_table(struct Object *ob, char mode); +int ED_mesh_mirror_spatial_table(struct Object *ob, struct BMEditMesh *em, const float co[3], char mode); +int ED_mesh_mirror_topo_table(struct Object *ob, char mode); /* retrieves mirrored cache vert, or NULL if there isn't one. * note: calling this without ensuring the mirror cache state diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 4d5fbda1ec6..b84a0cc6600 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -402,8 +402,8 @@ void EDBM_mesh_free(BMEditMesh *em) /* These tables aren't used yet, so it's not strictly necessary * to 'end' them (with 'e' param) but if someone tries to start * using them, having these in place will save a lot of pain */ - mesh_octree_table(NULL, NULL, NULL, 'e'); - mesh_mirrtopo_table(NULL, 'e'); + ED_mesh_mirror_spatial_table(NULL, NULL, NULL, 'e'); + ED_mesh_mirror_topo_table(NULL, 'e'); BKE_editmesh_free(em); } diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 8047959fb54..5558e6fae72 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -670,11 +670,11 @@ static struct { void *tree; } MirrKdStore = {NULL}; /* mode is 's' start, or 'e' end, or 'u' use */ /* if end, ob can be NULL */ -int mesh_octree_table(Object *ob, BMEditMesh *em, const float co[3], char mode) +int ED_mesh_mirror_spatial_table(Object *ob, BMEditMesh *em, const float co[3], char mode) { if (mode == 'u') { /* use table */ if (MirrKdStore.tree == NULL) - mesh_octree_table(ob, em, NULL, 's'); + ED_mesh_mirror_spatial_table(ob, em, NULL, 's'); if (MirrKdStore.tree) { KDTreeNearest nearest; @@ -696,7 +696,7 @@ int mesh_octree_table(Object *ob, BMEditMesh *em, const float co[3], char mode) int totvert; if (MirrKdStore.tree) /* happens when entering this call without ending it */ - mesh_octree_table(ob, em, co, 'e'); + ED_mesh_mirror_spatial_table(ob, em, co, 'e'); if (em && me->edit_btmesh == em) { totvert = em->bm->totvert; @@ -758,11 +758,11 @@ static MirrTopoStore_t mesh_topo_store = {NULL, -1. - 1, -1}; /* mode is 's' start, or 'e' end, or 'u' use */ /* if end, ob can be NULL */ /* note, is supposed return -1 on error, which callers are currently checking for, but is not used so far */ -int mesh_mirrtopo_table(Object *ob, char mode) +int ED_mesh_mirror_topo_table(Object *ob, char mode) { if (mode == 'u') { /* use table */ if (ED_mesh_mirrtopo_recalc_check(ob->data, ob->mode, &mesh_topo_store)) { - mesh_mirrtopo_table(ob, 's'); + ED_mesh_mirror_topo_table(ob, 's'); } } else if (mode == 's') { /* start table */ @@ -792,12 +792,12 @@ static int mesh_get_x_mirror_vert_spatial(Object *ob, int index) vec[1] = mvert->co[1]; vec[2] = mvert->co[2]; - return mesh_octree_table(ob, NULL, vec, 'u'); + return ED_mesh_mirror_spatial_table(ob, NULL, vec, 'u'); } static int mesh_get_x_mirror_vert_topo(Object *ob, int index) { - if (mesh_mirrtopo_table(ob, 'u') == -1) + if (ED_mesh_mirror_topo_table(ob, 'u') == -1) return -1; return mesh_topo_store.index_lookup[index]; @@ -830,7 +830,7 @@ static BMVert *editbmesh_get_x_mirror_vert_spatial(Object *ob, BMEditMesh *em, c vec[1] = co[1]; vec[2] = co[2]; - i = mesh_octree_table(ob, em, vec, 'u'); + i = ED_mesh_mirror_spatial_table(ob, em, vec, 'u'); if (i != -1) { return BM_vert_at_index(em->bm, i); } @@ -840,7 +840,7 @@ static BMVert *editbmesh_get_x_mirror_vert_spatial(Object *ob, BMEditMesh *em, c static BMVert *editbmesh_get_x_mirror_vert_topo(Object *ob, struct BMEditMesh *em, BMVert *eve, int index) { intptr_t poinval; - if (mesh_mirrtopo_table(ob, 'u') == -1) + if (ED_mesh_mirror_topo_table(ob, 'u') == -1) return NULL; if (index == -1) { @@ -1018,12 +1018,12 @@ int *mesh_get_x_mirror_faces(Object *ob, BMEditMesh *em) mirrorverts = MEM_callocN(sizeof(int) * me->totvert, "MirrorVerts"); mirrorfaces = MEM_callocN(sizeof(int) * 2 * me->totface, "MirrorFaces"); - mesh_octree_table(ob, em, NULL, 's'); + ED_mesh_mirror_spatial_table(ob, em, NULL, 's'); for (a = 0, mv = mvert; a < me->totvert; a++, mv++) mirrorverts[a] = mesh_get_x_mirror_vert(ob, a, use_topology); - mesh_octree_table(ob, em, NULL, 'e'); + ED_mesh_mirror_spatial_table(ob, em, NULL, 'e'); fhash = BLI_ghash_new_ex(mirror_facehash, mirror_facecmp, "mirror_facehash gh", me->totface); for (a = 0, mf = mface; a < me->totface; a++, mf++) diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index b8caf02fcd8..201ce460f88 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -338,8 +338,8 @@ static bool ED_object_editmode_load_ex(Object *obedit, const bool freedata) me->edit_btmesh = NULL; } if (obedit->restore_mode & OB_MODE_WEIGHT_PAINT) { - mesh_octree_table(NULL, NULL, NULL, 'e'); - mesh_mirrtopo_table(NULL, 'e'); + ED_mesh_mirror_spatial_table(NULL, NULL, NULL, 'e'); + ED_mesh_mirror_topo_table(NULL, 'e'); } } else if (obedit->type == OB_ARMATURE) { diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c index 3df4f721f7a..5dd20a76e28 100644 --- a/source/blender/editors/object/object_shapekey.c +++ b/source/blender/editors/object/object_shapekey.c @@ -193,7 +193,7 @@ static bool object_shape_key_mirror(bContext *C, Object *ob, float *fp1, *fp2; float tvec[3]; - mesh_octree_table(ob, NULL, NULL, 's'); + ED_mesh_mirror_spatial_table(ob, NULL, NULL, 's'); for (i1 = 0, mv = me->mvert; i1 < me->totvert; i1++, mv++) { i2 = mesh_get_x_mirror_vert(ob, i1, use_topology); @@ -224,7 +224,7 @@ static bool object_shape_key_mirror(bContext *C, Object *ob, } } - mesh_octree_table(ob, NULL, NULL, 'e'); + ED_mesh_mirror_spatial_table(ob, NULL, NULL, 'e'); } else if (ob->type == OB_LATTICE) { Lattice *lt = ob->data; diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 12eb1524515..e058f924a7b 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2060,8 +2060,8 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op) } /* weight paint specific */ - mesh_octree_table(NULL, NULL, NULL, 'e'); - mesh_mirrtopo_table(NULL, 'e'); + ED_mesh_mirror_spatial_table(NULL, NULL, NULL, 'e'); + ED_mesh_mirror_topo_table(NULL, 'e'); paint_cursor_delete_textures(); } @@ -2076,7 +2076,7 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op) BKE_paint_init(&wp->paint, PAINT_CURSOR_WEIGHT_PAINT); /* weight paint specific */ - mesh_octree_table(ob, NULL, NULL, 's'); + ED_mesh_mirror_spatial_table(ob, NULL, NULL, 's'); ED_vgroup_sync_from_pose(ob); } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index b4bd922412c..9aa00ae55d4 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5687,7 +5687,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t) if (t->obedit->type == OB_MESH) { BMEditMesh *em = BKE_editmesh_from_object(t->obedit); /* table needs to be created for each edit command, since vertices can move etc */ - mesh_octree_table(t->obedit, em, NULL, 'e'); + ED_mesh_mirror_spatial_table(t->obedit, em, NULL, 'e'); } } else if ((t->flag & T_POSE) && (t->poseobj)) { diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 6e41fb993e4..b490d81761c 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -137,8 +137,8 @@ void ED_editors_exit(bContext *C) } /* global in meshtools... */ - mesh_octree_table(NULL, NULL, NULL, 'e'); - mesh_mirrtopo_table(NULL, 'e'); + ED_mesh_mirror_spatial_table(NULL, NULL, NULL, 'e'); + ED_mesh_mirror_topo_table(NULL, 'e'); } /* flush any temp data from object editing to DNA before writing files, diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c index 901724842f6..bbece2a33d0 100644 --- a/source/blenderplayer/bad_level_call_stubs/stubs.c +++ b/source/blenderplayer/bad_level_call_stubs/stubs.c @@ -457,8 +457,8 @@ float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vert void ED_vgroup_delete(struct Object *ob, struct bDeformGroup *defgroup) RET_NONE void ED_vgroup_clear(struct Object *ob) RET_NONE bool ED_vgroup_object_is_edit_mode(struct Object *ob) RET_ZERO -int mesh_mirrtopo_table(struct Object *ob, char mode) RET_ZERO -int mesh_octree_table(struct Object *ob, struct BMEditMesh *em, const float co[3], char mode) RET_ZERO +int ED_mesh_mirror_topo_table(struct Object *ob, char mode) RET_ZERO +int ED_mesh_mirror_spatial_table(struct Object *ob, struct BMEditMesh *em, const float co[3], char mode) RET_ZERO float ED_rollBoneToVector(EditBone *bone, const float new_up_axis[3], const short axis_only) RET_ZERO void ED_space_image_get_size(struct SpaceImage *sima, int *width, int *height) RET_NONE |