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/armature')
-rw-r--r--source/blender/editors/armature/armature_edit.c4
-rw-r--r--source/blender/editors/armature/armature_utils.c5
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c4
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c9
-rw-r--r--source/blender/editors/armature/pose_group.c2
-rw-r--r--source/blender/editors/armature/pose_lib.c2
-rw-r--r--source/blender/editors/armature/pose_utils.c2
7 files changed, 13 insertions, 15 deletions
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 1819492c346..db57e762848 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -808,7 +808,7 @@ static int armature_merge_exec(bContext *C, wmOperator *op)
/* get chains (ends on chains) */
chains_find_tips(arm->edbo, &chains);
- if (chains.first == NULL) return OPERATOR_CANCELLED;
+ if (BLI_listbase_is_empty(&chains)) return OPERATOR_CANCELLED;
/* each 'chain' is the last bone in the chain (with no children) */
for (chain = chains.first; chain; chain = nchain) {
@@ -916,7 +916,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
/* get chains of bones (ends on chains) */
chains_find_tips(arm->edbo, &chains);
- if (chains.first == NULL) return OPERATOR_CANCELLED;
+ if (BLI_listbase_is_empty(&chains)) return OPERATOR_CANCELLED;
/* ensure that mirror bones will also be operated on */
armature_tag_select_mirrored(arm);
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c
index 7c7027641d7..52e3285d240 100644
--- a/source/blender/editors/armature/armature_utils.c
+++ b/source/blender/editors/armature/armature_utils.c
@@ -655,8 +655,7 @@ static void ED_armature_ebone_listbase_free(ListBase *lb)
MEM_freeN(ebone);
}
- lb->first = NULL;
- lb->last = NULL;
+ BLI_listbase_clear(lb);
}
static void ED_armature_ebone_listbase_copy(ListBase *lb_dst, ListBase *lb_src)
@@ -664,7 +663,7 @@ static void ED_armature_ebone_listbase_copy(ListBase *lb_dst, ListBase *lb_src)
EditBone *ebone_src;
EditBone *ebone_dst;
- BLI_assert(lb_dst->first == NULL);
+ BLI_assert(BLI_listbase_is_empty(lb_dst));
for (ebone_src = lb_src->first; ebone_src; ebone_src = ebone_src->next) {
ebone_dst = MEM_dupallocN(ebone_src);
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 4ea564b46ce..a0411f246c8 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -944,7 +944,7 @@ static void RIG_joinArcs(RigGraph *rg, RigNode *node, RigArc *joined_arc1, RigAr
joined_arc1->tail = joined_arc2->tail;
- joined_arc2->edges.first = joined_arc2->edges.last = NULL;
+ BLI_listbase_clear(&joined_arc2->edges);
BLI_removeArc((BGraph *)rg, (BArc *)joined_arc2);
@@ -2593,7 +2593,7 @@ void BIF_retargetArc(bContext *C, ReebArc *earc, RigGraph *template_rigg)
template_rigg = armatureSelectedToGraph(C, ob, ob->data);
}
- if (template_rigg->arcs.first == NULL) {
+ if (BLI_listbase_is_empty(&template_rigg->arcs)) {
// XXX
// error("No Template and no deforming bones selected");
return;
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index a1ec0b595b0..68141fb85f1 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -979,7 +979,7 @@ static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, S
float mvalf[2];
BLI_freelistN(&sketch->depth_peels);
- sketch->depth_peels.first = sketch->depth_peels.last = NULL;
+ BLI_listbase_clear(&sketch->depth_peels);
mvalf[0] = dd->mval[0];
mvalf[1] = dd->mval[1];
@@ -1915,8 +1915,8 @@ void sk_applyConvertGesture(bContext *C, SK_Gesture *UNUSED(gest), SK_Sketch *sk
static void sk_initGesture(bContext *C, SK_Gesture *gest, SK_Sketch *sketch)
{
- gest->intersections.first = gest->intersections.last = NULL;
- gest->self_intersections.first = gest->self_intersections.last = NULL;
+ BLI_listbase_clear(&gest->intersections);
+ BLI_listbase_clear(&gest->self_intersections);
gest->segments = sk_createStroke();
gest->stk = sketch->gesture;
@@ -2093,8 +2093,7 @@ static void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch,
}
#if 0
- if (sketch->depth_peels.first != NULL)
- {
+ if (BLI_listbase_is_empty(&sketch->depth_peels) == false) {
float colors[8][3] = {
{1, 0, 0},
{0, 1, 0},
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c
index 99f54de134a..d2d48fce8e6 100644
--- a/source/blender/editors/armature/pose_group.c
+++ b/source/blender/editors/armature/pose_group.c
@@ -399,7 +399,7 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
qsort(agrp_array, agrp_count, sizeof(tSortActionGroup), compare_agroup);
/* create sorted bone group list from sorted array */
- pose->agroups.first = pose->agroups.last = NULL;
+ BLI_listbase_clear(&pose->agroups);
for (i = 0; i < agrp_count; i++) {
BLI_addtail(&pose->agroups, agrp_array[i].agrp);
}
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index 7a825b3805c..f77a3da06fb 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -1069,7 +1069,7 @@ static void poselib_preview_get_next(tPoseLib_PreviewData *pld, int step)
}
/* check if any matches */
- if (pld->searchp.first == NULL) {
+ if (BLI_listbase_is_empty(&pld->searchp)) {
pld->marker = NULL;
return;
}
diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c
index 014a64170db..380a3fffc6d 100644
--- a/source/blender/editors/armature/pose_utils.c
+++ b/source/blender/editors/armature/pose_utils.c
@@ -129,7 +129,7 @@ void poseAnim_mapping_get(bContext *C, ListBase *pfLinks, Object *ob, bAction *a
/* if no PoseChannels were found, try a second pass, doing visible ones instead
* i.e. if nothing selected, do whole pose
*/
- if (pfLinks->first == NULL) {
+ if (BLI_listbase_is_empty(pfLinks)) {
CTX_DATA_BEGIN (C, bPoseChannel *, pchan, visible_pose_bones)
{
fcurves_to_pchan_links_get(pfLinks, ob, act, pchan);