From b3afbcab8ff2330c1473647be330a3ffe9b11885 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 8 Feb 2014 06:07:10 +1100 Subject: ListBase API: add utility api funcs for clearing and checking empty --- source/blender/ikplugin/intern/itasc_plugin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/ikplugin/intern/itasc_plugin.cpp') diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index 50b538b002f..e1bc47b107f 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -258,14 +258,14 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co if (segcount == rootbone) { // reached this end of the chain but if the chain is overlapping with a // previous one, we must go back up to the root of the other chain - if ((curchan->flag & POSE_CHAIN) && curchan->iktree.first == NULL) { + if ((curchan->flag & POSE_CHAIN) && BLI_listbase_is_empty(&curchan->iktree)) { rootbone++; continue; } break; } - if (curchan->iktree.first != NULL) + if (BLI_listbase_is_empty(&curchan->iktree) == false) // Oh oh, there is already a chain starting from this channel and our chain is longer... // Should handle this by moving the previous chain up to the beginning of our chain // For now we just stop here @@ -273,7 +273,7 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co } if (!segcount) return 0; // we reached a limit and still not the end of a previous chain, quit - if ((pchan_root->flag & POSE_CHAIN) && pchan_root->iktree.first == NULL) return 0; + if ((pchan_root->flag & POSE_CHAIN) && BLI_listbase_is_empty(&pchan_root->iktree)) return 0; // now that we know how many segment we have, set the flag for (rootbone = segcount, segcount = 0, curchan = pchan_tip; segcount < rootbone; segcount++, curchan = curchan->parent) { -- cgit v1.2.3