diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-02-07 23:07:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-07 23:24:05 +0400 |
commit | b3afbcab8ff2330c1473647be330a3ffe9b11885 (patch) | |
tree | e86b9c7d9676e63b8da92da79889dee13b8be186 /source/blender/editors/physics/particle_edit.c | |
parent | 1c24d954f4ac63f22b703756b6664a4ad1b363d4 (diff) |
ListBase API: add utility api funcs for clearing and checking empty
Diffstat (limited to 'source/blender/editors/physics/particle_edit.c')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 253a420b88a..d9ec0cf8416 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -227,7 +227,7 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create) BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); /* in the case of only one editable thing, set pset->edittype accordingly */ - if (pidlist.first && pidlist.first == pidlist.last) { + if (BLI_listbase_is_single(&pidlist)) { pid = pidlist.first; switch (pid->type) { case PTCACHE_TYPE_PARTICLES: @@ -4266,7 +4266,7 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache, if (cache && cache->flag & PTCACHE_DISK_CACHE) return; - if (psys == NULL && (cache && cache->mem_cache.first == NULL)) + if (psys == NULL && (cache && BLI_listbase_is_empty(&cache->mem_cache))) return; edit = (psys) ? psys->edit : cache->edit; @@ -4285,7 +4285,7 @@ static void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache, psys->free_edit= PE_free_ptcache_edit; edit->pathcache = NULL; - edit->pathcachebufs.first = edit->pathcachebufs.last = NULL; + BLI_listbase_clear(&edit->pathcachebufs); pa = psys->particles; LOOP_POINTS { |