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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-03-14 20:07:01 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-03-14 20:10:31 +0300
commit9009622b5464f13cc9521663b43605bf85e8e0b5 (patch)
tree72d95313921af3c5687e13e58dcf6f9c4fe68232 /source/blender/editors
parent9521b67ac0db5958df14ff92e5334bca07902481 (diff)
parentb0823962e9b82d2bfa0551cb072bd61b67ddc773 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c2
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c2
-rw-r--r--source/blender/editors/mesh/editmesh_select.c4
-rw-r--r--source/blender/editors/object/object_transform.c4
-rw-r--r--source/blender/editors/object/object_vgroup.c4
-rw-r--r--source/blender/editors/space_node/node_templates.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c18
7 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index d137e5f1c74..2f9d32eadb6 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -3090,7 +3090,7 @@ static bool select_anim_channel_keys(bAnimContext *ac, int channel_index, bool e
for (ale = anim_data.first; ale; ale = ale->next) {
FCurve *fcu_inner = (FCurve *)ale->key_data;
- if (fcu_inner) {
+ if (fcu_inner != NULL && fcu_inner->bezt != NULL) {
for (i = 0, bezt = fcu_inner->bezt; i < fcu_inner->totvert; i++, bezt++) {
bezt->f2 = bezt->f1 = bezt->f3 = 0;
}
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index d9bbec7082d..cd894502bc4 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1782,7 +1782,7 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
}
kcd->linehits = linehits;
- kcd->totlinehit = BLI_array_count(linehits);
+ kcd->totlinehit = BLI_array_len(linehits);
/* find position along screen line, used for sorting */
for (i = 0; i < kcd->totlinehit; i++) {
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index a6bbebb834e..513e939c529 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -4103,7 +4103,7 @@ static int loop_find_region(
BLI_array_append(stack, l->f);
BLI_gset_insert(visit_face_set, l->f);
- while (BLI_array_count(stack) > 0) {
+ while (BLI_array_len(stack) > 0) {
BMIter liter1, liter2;
BMLoop *l1, *l2;
@@ -4131,7 +4131,7 @@ static int loop_find_region(
BLI_array_free(stack);
*region_out = region;
- return BLI_array_count(region);
+ return BLI_array_len(region);
}
static int verg_radial(const void *va, const void *vb)
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 033f9d190b7..7ea1a04f31f 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -1343,9 +1343,9 @@ static int object_transform_axis_target_invoke(bContext *C, wmOperator *op, cons
CTX_DATA_END;
xfd->object_data = object_data;
- xfd->object_data_len = BLI_array_count(object_data);
+ xfd->object_data_len = BLI_array_len(object_data);
- if (xfd->object_data_len != BLI_array_count(object_data)) {
+ if (xfd->object_data_len != BLI_array_len(object_data)) {
xfd->object_data = MEM_reallocN(xfd->object_data, xfd->object_data_len * sizeof(*xfd->object_data));
}
}
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 00a24e7fe72..eb04de5feb2 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -1192,7 +1192,7 @@ static int *getSurroundingVerts(Mesh *me, int vert, int *count)
}
/* Append a and b verts to array, if not yet present. */
- k = BLI_array_count(verts);
+ k = BLI_array_len(verts);
/* XXX Maybe a == b is enough? */
while (k-- && !(a == b && a == -1)) {
if (verts[k] == a)
@@ -1214,7 +1214,7 @@ static int *getSurroundingVerts(Mesh *me, int vert, int *count)
}
/* Do not free the array! */
- *count = BLI_array_count(verts);
+ *count = BLI_array_len(verts);
return verts;
}
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index c791b9f6eae..1047c498e4d 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -482,10 +482,10 @@ static void ui_node_menu_column(NodeLinkArg *arg, int nclass, const char *cname)
}
NODE_TYPES_END
- qsort(sorted_ntypes, BLI_array_count(sorted_ntypes), sizeof(bNodeType *), ui_node_item_name_compare);
+ qsort(sorted_ntypes, BLI_array_len(sorted_ntypes), sizeof(bNodeType *), ui_node_item_name_compare);
/* generate UI */
- for (int j = 0; j < BLI_array_count(sorted_ntypes); j++) {
+ for (int j = 0; j < BLI_array_len(sorted_ntypes); j++) {
bNodeType *ntype = sorted_ntypes[j];
NodeLinkItem *items;
int totitems;
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 1acd6a1152d..9df0c7c89ed 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1663,13 +1663,13 @@ static void uv_weld_align(bContext *C, int tool)
}
/* now we have all verts, make into a line */
- if (BLI_array_count(eve_line) > 2) {
+ if (BLI_array_len(eve_line) > 2) {
/* we know the returns from these must be valid */
const float *uv_start = uv_sel_co_from_eve(
scene, obedit, ima, em, eve_line[0]);
const float *uv_end = uv_sel_co_from_eve(
- scene, obedit, ima, em, eve_line[BLI_array_count(eve_line) - 1]);
+ scene, obedit, ima, em, eve_line[BLI_array_len(eve_line) - 1]);
/* For t & u modes */
float a = 0.0f;
@@ -1687,7 +1687,7 @@ static void uv_weld_align(bContext *C, int tool)
}
/* go over all verts except for endpoints */
- for (i = 0; i < BLI_array_count(eve_line); i++) {
+ for (i = 0; i < BLI_array_len(eve_line); i++) {
BM_ITER_ELEM (l, &liter, eve_line[i], BM_LOOPS_OF_VERT) {
if (!uvedit_face_visible_test(scene, obedit, ima, l->f))
continue;
@@ -1818,7 +1818,7 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
}
}
- for (uv_a_index = 0; uv_a_index < BLI_array_count(vert_arr); uv_a_index++) {
+ for (uv_a_index = 0; uv_a_index < BLI_array_len(vert_arr); uv_a_index++) {
if (vert_arr[uv_a_index].weld == false) {
float uv_min[2];
float uv_max[2];
@@ -1832,7 +1832,7 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
copy_v2_v2(uv_min, uv_a);
vert_arr[uv_a_index].weld = true;
- for (uv_b_index = uv_a_index + 1; uv_b_index < BLI_array_count(vert_arr); uv_b_index++) {
+ for (uv_b_index = uv_a_index + 1; uv_b_index < BLI_array_len(vert_arr); uv_b_index++) {
uv_b = vert_arr[uv_b_index].uv_loop->uv;
if ((vert_arr[uv_b_index].weld == false) &&
(len_manhattan_v2v2(uv_a, uv_b) < threshold))
@@ -1842,10 +1842,10 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
vert_arr[uv_b_index].weld = true;
}
}
- if (BLI_array_count(loop_arr)) {
+ if (BLI_array_len(loop_arr)) {
float uv_mid[2];
mid_v2_v2v2(uv_mid, uv_min, uv_max);
- for (uv_b_index = 0; uv_b_index < BLI_array_count(loop_arr); uv_b_index++) {
+ for (uv_b_index = 0; uv_b_index < BLI_array_len(loop_arr); uv_b_index++) {
copy_v2_v2(loop_arr[uv_b_index]->uv, uv_mid);
}
}
@@ -1879,12 +1879,12 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op)
}
}
- for (uv_a_index = 0; uv_a_index < BLI_array_count(loop_arr); uv_a_index++) {
+ for (uv_a_index = 0; uv_a_index < BLI_array_len(loop_arr); uv_a_index++) {
float dist_best = FLT_MAX, dist;
const float *uv_best = NULL;
uv_a = loop_arr[uv_a_index]->uv;
- for (uv_b_index = 0; uv_b_index < BLI_array_count(loop_arr_unselected); uv_b_index++) {
+ for (uv_b_index = 0; uv_b_index < BLI_array_len(loop_arr_unselected); uv_b_index++) {
uv_b = loop_arr_unselected[uv_b_index]->uv;
dist = len_manhattan_v2v2(uv_a, uv_b);
if ((dist < threshold) && (dist < dist_best)) {