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:
authorCampbell Barton <ideasman42@gmail.com>2014-02-07 23:07:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-07 23:24:05 +0400
commitb3afbcab8ff2330c1473647be330a3ffe9b11885 (patch)
treee86b9c7d9676e63b8da92da79889dee13b8be186 /source/blender/blenkernel/intern/linestyle.c
parent1c24d954f4ac63f22b703756b6664a4ad1b363d4 (diff)
ListBase API: add utility api funcs for clearing and checking empty
Diffstat (limited to 'source/blender/blenkernel/intern/linestyle.c')
-rw-r--r--source/blender/blenkernel/intern/linestyle.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index 71c917d4528..3622174975a 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -90,10 +90,10 @@ static void default_linestyle_settings(FreestyleLineStyle *linestyle)
linestyle->max_length = 10000.0f;
linestyle->split_length = 100;
- linestyle->color_modifiers.first = linestyle->color_modifiers.last = NULL;
- linestyle->alpha_modifiers.first = linestyle->alpha_modifiers.last = NULL;
- linestyle->thickness_modifiers.first = linestyle->thickness_modifiers.last = NULL;
- linestyle->geometry_modifiers.first = linestyle->geometry_modifiers.last = NULL;
+ BLI_listbase_clear(&linestyle->color_modifiers);
+ BLI_listbase_clear(&linestyle->alpha_modifiers);
+ BLI_listbase_clear(&linestyle->thickness_modifiers);
+ BLI_listbase_clear(&linestyle->geometry_modifiers);
BKE_add_linestyle_geometry_modifier(linestyle, LS_MODIFIER_SAMPLING);
@@ -1005,7 +1005,8 @@ void BKE_list_modifier_color_ramps(FreestyleLineStyle *linestyle, ListBase *list
ColorBand *color_ramp;
LinkData *link;
- listbase->first = listbase->last = NULL;
+ BLI_listbase_clear(listbase);
+
for (m = (LineStyleModifier *)linestyle->color_modifiers.first; m; m = m->next) {
switch (m->type) {
case LS_MODIFIER_ALONG_STROKE: