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:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_markers.c5
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c2
-rw-r--r--source/blender/editors/armature/reeb.c10
-rw-r--r--source/blender/editors/curve/editcurve.c2
-rw-r--r--source/blender/editors/curve/editcurve_paint.c12
-rw-r--r--source/blender/editors/curve/editcurve_select.c2
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c6
-rw-r--r--source/blender/editors/render/render_update.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c4
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c8
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c8
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c2
13 files changed, 34 insertions, 33 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 075c2e5a429..e43735c51fb 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -1113,14 +1113,15 @@ static void select_timeline_marker_frame(ListBase *markers, int frame, bool exte
}
}
- BLI_LISTBASE_CIRCULAR_FORWARD_BEGIN (markers, marker, marker_first) {
+ LISTBASE_CIRCULAR_FORWARD_BEGIN(markers, marker, marker_first)
+ {
/* this way a not-extend select will always give 1 selected marker */
if (marker->frame == frame) {
marker->flag ^= SELECT;
break;
}
}
- BLI_LISTBASE_CIRCULAR_FORWARD_END (markers, marker, marker_first);
+ LISTBASE_CIRCULAR_FORWARD_END(markers, marker, marker_first);
}
static int ed_marker_select(bContext *C, const wmEvent *event, bool extend, bool camera)
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 279d0eb8868..c91f92bc70b 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -178,7 +178,7 @@ const char *BIF_listTemplates(const bContext *UNUSED(C))
GHashIterator ghi;
const char *menu_header = IFACE_("Template %t|None %x0|");
char *p;
- const size_t template_size = (BLI_ghash_size(TEMPLATES_HASH) * 32 + 30);
+ const size_t template_size = (BLI_ghash_len(TEMPLATES_HASH) * 32 + 30);
if (TEMPLATES_MENU != NULL) {
MEM_freeN(TEMPLATES_MENU);
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index 0eb44085bae..fda7012e955 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -546,7 +546,7 @@ void verifyFaces(ReebGraph *rg)
int total = 0;
ReebArc *arc = NULL;
for (arc = rg->arcs.first; arc; arc = arc->next) {
- total += BLI_ghash_size(arc->faces);
+ total += BLI_ghash_len(arc->faces);
}
#endif
@@ -1656,7 +1656,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold))
{
GHashIterator ghi;
int merging = 0;
- int total = BLI_ghash_size(arc->faces);
+ int total = BLI_ghash_len(arc->faces);
float avg_angle = 0;
float avg_vec[3] = {0, 0, 0};
@@ -1932,7 +1932,7 @@ void REEB_exportGraph(ReebGraph *rg, int count)
add_v3_v3v3(p, arc->tail->p, arc->head->p);
mul_v3_fl(p, 0.5f);
- fprintf(f, "angle %0.3f %0.3f %0.3f %0.3f %i\n", p[0], p[1], p[2], arc->angle, BLI_ghash_size(arc->faces));
+ fprintf(f, "angle %0.3f %0.3f %0.3f %0.3f %i\n", p[0], p[1], p[2], arc->angle, BLI_ghash_len(arc->faces));
exportNode(f, "v2", arc->tail);
}
@@ -2678,7 +2678,7 @@ static void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeInd
eed->f1 = 0;
}
- while (BLI_heap_size(edge_heap) > 0) {
+ while (BLI_heap_len(edge_heap) > 0) {
float current_weight;
current_eve->f1 = 1; /* mark vertex as selected */
@@ -2695,7 +2695,7 @@ static void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeInd
/* Find next shortest edge with unselected verts */
do {
current_weight = BLI_heap_node_value(BLI_heap_top(edge_heap));
- select_eed = BLI_heap_popmin(edge_heap);
+ select_eed = BLI_heap_pop_min(edge_heap);
} while (select_eed != NULL && select_eed->v1->f1 != 0 && select_eed->v2->f1);
if (select_eed != NULL) {
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index c3e92589791..94b090bff05 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -530,7 +530,7 @@ static GHash *dupli_keyIndexHash(GHash *keyindex)
GHash *gh;
GHashIterator gh_iter;
- gh = BLI_ghash_ptr_new_ex("dupli_keyIndex gh", BLI_ghash_size(keyindex));
+ gh = BLI_ghash_ptr_new_ex("dupli_keyIndex gh", BLI_ghash_len(keyindex));
GHASH_ITER (gh_iter, keyindex) {
void *cv = BLI_ghashIterator_getKey(&gh_iter);
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index 0d2514ec27e..169afb140fb 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -365,7 +365,7 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), ARegion *UNUS
wmOperator *op = arg;
struct CurveDrawData *cdd = op->customdata;
- const int stroke_len = BLI_mempool_count(cdd->stroke_elem_pool);
+ const int stroke_len = BLI_mempool_len(cdd->stroke_elem_pool);
if (stroke_len == 0) {
return;
@@ -706,7 +706,7 @@ static void curve_draw_exec_precalc(wmOperator *op)
if (!RNA_property_is_set(op->ptr, prop)) {
bool use_cyclic = false;
- if (BLI_mempool_count(cdd->stroke_elem_pool) > 2) {
+ if (BLI_mempool_len(cdd->stroke_elem_pool) > 2) {
BLI_mempool_iter iter;
const struct StrokeElem *selem, *selem_first, *selem_last;
@@ -732,7 +732,7 @@ static void curve_draw_exec_precalc(wmOperator *op)
(cps->radius_taper_end != 0.0f))
{
/* note, we could try to de-duplicate the length calculations above */
- const int stroke_len = BLI_mempool_count(cdd->stroke_elem_pool);
+ const int stroke_len = BLI_mempool_len(cdd->stroke_elem_pool);
BLI_mempool_iter iter;
struct StrokeElem *selem, *selem_prev;
@@ -792,14 +792,14 @@ static int curve_draw_exec(bContext *C, wmOperator *op)
Curve *cu = obedit->data;
ListBase *nurblist = object_editcurve_get(obedit);
- int stroke_len = BLI_mempool_count(cdd->stroke_elem_pool);
+ int stroke_len = BLI_mempool_len(cdd->stroke_elem_pool);
const bool is_3d = (cu->flag & CU_3D) != 0;
invert_m4_m4(obedit->imat, obedit->obmat);
- if (BLI_mempool_count(cdd->stroke_elem_pool) == 0) {
+ if (BLI_mempool_len(cdd->stroke_elem_pool) == 0) {
curve_draw_stroke_from_operator(op);
- stroke_len = BLI_mempool_count(cdd->stroke_elem_pool);
+ stroke_len = BLI_mempool_len(cdd->stroke_elem_pool);
}
ED_curve_deselect_all(cu->editnurb);
diff --git a/source/blender/editors/curve/editcurve_select.c b/source/blender/editors/curve/editcurve_select.c
index 02b8970731c..4a4b13d0d1b 100644
--- a/source/blender/editors/curve/editcurve_select.c
+++ b/source/blender/editors/curve/editcurve_select.c
@@ -1607,7 +1607,7 @@ static void curve_select_shortest_path_surf(Nurb *nu, int vert_src, int vert_dst
int axis, sign;
int u, v;
- vert_curr = *((int *)BLI_heap_popmin(heap));
+ vert_curr = *((int *)BLI_heap_pop_min(heap));
if (vert_curr == vert_dst) {
break;
}
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 671a868947e..d9bbec7082d 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1158,7 +1158,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
immUniformColor3ubv(kcd->colors.line);
glLineWidth(1.0);
- immBeginAtMost(GWN_PRIM_LINES, BLI_mempool_count(kcd->kedges) * 2);
+ immBeginAtMost(GWN_PRIM_LINES, BLI_mempool_len(kcd->kedges) * 2);
BLI_mempool_iternew(kcd->kedges, &iter);
for (kfe = BLI_mempool_iterstep(&iter); kfe; kfe = BLI_mempool_iterstep(&iter)) {
@@ -1179,7 +1179,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
immUniformColor3ubv(kcd->colors.point);
glPointSize(5.0);
- immBeginAtMost(GWN_PRIM_POINTS, BLI_mempool_count(kcd->kverts));
+ immBeginAtMost(GWN_PRIM_POINTS, BLI_mempool_len(kcd->kverts));
BLI_mempool_iternew(kcd->kverts, &iter);
for (kfv = BLI_mempool_iterstep(&iter); kfv; kfv = BLI_mempool_iterstep(&iter)) {
@@ -2300,7 +2300,7 @@ static void knife_make_face_cuts(KnifeTool_OpData *kcd, BMFace *f, ListBase *kfe
/* point to knife edges we've created edges in, edge_array aligned */
KnifeEdge **kfe_array = BLI_array_alloca(kfe_array, edge_array_len);
- BLI_assert(BLI_gset_size(kcd->edgenet.edge_visit) == 0);
+ BLI_assert(BLI_gset_len(kcd->edgenet.edge_visit) == 0);
i = 0;
for (ref = kfedges->first; ref; ref = ref->next) {
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 92f9dd9ee26..7b2fcc15649 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -202,7 +202,7 @@ void ED_render_engine_changed(Main *bmain)
update_ctx.bmain = bmain;
for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
update_ctx.scene = scene;
- BLI_LISTBASE_FOREACH(ViewLayer *, view_layer, &scene->view_layers) {
+ LISTBASE_FOREACH(ViewLayer *, view_layer, &scene->view_layers) {
/* TDODO(sergey): Iterate over depsgraphs instead? */
update_ctx.depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true);
update_ctx.view_layer = view_layer;
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index c736f70f9fa..700b0969277 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -759,7 +759,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
MEM_freeN(uniqueUv);
/* Allocate connectivity data, we allocate edges once */
- data->uvedges = MEM_mallocN(sizeof(*data->uvedges) * BLI_ghash_size(edgeHash), "uv_brush_edge_connectivity_data");
+ data->uvedges = MEM_mallocN(sizeof(*data->uvedges) * BLI_ghash_len(edgeHash), "uv_brush_edge_connectivity_data");
if (!data->uvedges) {
BLI_ghash_free(edgeHash, NULL, NULL);
MEM_freeN(edges);
@@ -772,7 +772,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
GHASH_ITER (gh_iter, edgeHash) {
data->uvedges[i++] = *((UvEdge *)BLI_ghashIterator_getKey(&gh_iter));
}
- data->totalUvEdges = BLI_ghash_size(edgeHash);
+ data->totalUvEdges = BLI_ghash_len(edgeHash);
/* cleanup temporary stuff */
BLI_ghash_free(edgeHash, NULL, NULL);
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index 3d5f12a94fd..efc28eea917 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -494,7 +494,7 @@ static int collection_objects_add_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN (C, struct Object *, ob, selected_objects)
{
- BLI_LISTBASE_FOREACH (LinkData *, link, &data.scene_collections_array) {
+ LISTBASE_FOREACH (LinkData *, link, &data.scene_collections_array) {
SceneCollection *scene_collection = link->data;
BKE_collection_object_add(
&scene->id,
@@ -549,7 +549,7 @@ static int collection_objects_remove_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN (C, struct Object *, ob, selected_objects)
{
- BLI_LISTBASE_FOREACH (LinkData *, link, &data.scene_collections_array) {
+ LISTBASE_FOREACH (LinkData *, link, &data.scene_collections_array) {
SceneCollection *scene_collection = link->data;
BKE_collection_object_remove(
bmain,
@@ -605,7 +605,7 @@ static int object_collection_remove_exec(bContext *C, wmOperator *UNUSED(op))
outliner_tree_traverse(soops, &soops->tree, 0, TSE_SELECTED, outliner_find_selected_objects, &data);
- BLI_LISTBASE_FOREACH (LinkData *, link, &data.objects_selected_array) {
+ LISTBASE_FOREACH (LinkData *, link, &data.objects_selected_array) {
TreeElement *te = (TreeElement *)link->data;
Object *ob = (Object *)TREESTORE(te)->id;
SceneCollection *scene_collection = NULL;
@@ -683,7 +683,7 @@ static int object_add_to_new_collection_exec(bContext *C, wmOperator *op)
scene_collection_parent = outliner_scene_collection_from_tree_element(te_parent);
scene_collection_new = BKE_collection_add(owner_id, scene_collection_parent, scene_collection_parent->type, NULL);
- BLI_LISTBASE_FOREACH (LinkData *, link, &data.objects_selected_array) {
+ LISTBASE_FOREACH (LinkData *, link, &data.objects_selected_array) {
TreeElement *te = (TreeElement *)link->data;
Object *ob = (Object *)TREESTORE(te)->id;
BKE_collection_object_add(owner_id, scene_collection_new, ob);
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index e2bd4c5672c..00eb4efde02 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -131,7 +131,7 @@ static void outliner_storage_cleanup(SpaceOops *soops)
}
if (unused) {
- if (BLI_mempool_count(ts) == unused) {
+ if (BLI_mempool_len(ts) == unused) {
BLI_mempool_destroy(ts);
soops->treestore = NULL;
if (soops->treehash) {
@@ -141,7 +141,7 @@ static void outliner_storage_cleanup(SpaceOops *soops)
}
else {
TreeStoreElem *tsenew;
- BLI_mempool *new_ts = BLI_mempool_create(sizeof(TreeStoreElem), BLI_mempool_count(ts) - unused,
+ BLI_mempool *new_ts = BLI_mempool_create(sizeof(TreeStoreElem), BLI_mempool_len(ts) - unused,
512, BLI_MEMPOOL_ALLOW_ITER);
BLI_mempool_iternew(ts, &iter);
while ((tselem = BLI_mempool_iterstep(&iter))) {
@@ -469,7 +469,7 @@ static void outliner_object_reorder(
TREESTORE(insert_element)->flag |= TSE_SELECTED;
outliner_tree_traverse(soops, &soops->tree, 0, TSE_SELECTED, outliner_find_selected_objects, &data);
- BLI_LISTBASE_FOREACH (LinkData *, link, &data.objects_selected_array) {
+ LISTBASE_FOREACH (LinkData *, link, &data.objects_selected_array) {
TreeElement *ten_selected = (TreeElement *)link->data;
Object *ob = (Object *)TREESTORE(ten_selected)->id;
@@ -2233,7 +2233,7 @@ void outliner_build_tree(
{
TreeElement *te = NULL, *ten;
TreeStoreElem *tselem;
- int show_opened = !soops->treestore || !BLI_mempool_count(soops->treestore); /* on first view, we open scenes */
+ int show_opened = !soops->treestore || !BLI_mempool_len(soops->treestore); /* on first view, we open scenes */
/* Are we looking for something - we want to tag parents to filter child matches
* - NOT in datablocks view - searching all datablocks takes way too long to be useful
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index 2a3a2b84223..f8a93bd2ce3 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -1291,7 +1291,7 @@ static void p_chart_fill_boundary(PChart *chart, PEdge *be, int nedges)
while (nedges > 2) {
PEdge *ne, *ne1, *ne2;
- e = (PEdge *)BLI_heap_popmin(heap);
+ e = (PEdge *)BLI_heap_pop_min(heap);
e1 = p_boundary_edge_prev(e);
e2 = p_boundary_edge_next(e);
@@ -2190,7 +2190,7 @@ static void p_chart_simplify_compute(PChart *chart)
break;
HeapNode *link = BLI_heap_top(heap);
- PEdge *edge = (PEdge *)BLI_heap_popmin(heap), *pair = edge->pair;
+ PEdge *edge = (PEdge *)BLI_heap_pop_min(heap), *pair = edge->pair;
PVert *oldv, *keepv;
PEdge *wheele, *nexte;
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index e19fa41b500..9cd34c46874 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -1851,7 +1851,7 @@ static int stitch_init(bContext *C, wmOperator *op)
}
}
- total_edges = BLI_ghash_size(edge_hash);
+ total_edges = BLI_ghash_len(edge_hash);
state->edges = edges = MEM_mallocN(sizeof(*edges) * total_edges, "stitch_edges");
/* I assume any system will be able to at least allocate an iterator :p */