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/editors/gpencil/editaction_gpencil.c
parent1c24d954f4ac63f22b703756b6664a4ad1b363d4 (diff)
ListBase API: add utility api funcs for clearing and checking empty
Diffstat (limited to 'source/blender/editors/gpencil/editaction_gpencil.c')
-rw-r--r--source/blender/editors/gpencil/editaction_gpencil.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c
index 9b7d691f081..8fcbee6f758 100644
--- a/source/blender/editors/gpencil/editaction_gpencil.c
+++ b/source/blender/editors/gpencil/editaction_gpencil.c
@@ -275,7 +275,7 @@ void free_gpcopybuf()
{
free_gpencil_layers(&gpcopybuf);
- gpcopybuf.first = gpcopybuf.last = NULL;
+ BLI_listbase_clear(&gpcopybuf);
gpcopy_firstframe = 999999999;
}
@@ -311,7 +311,7 @@ void copy_gpdata()
gpls = (bGPDlayer *)ale->data;
gpln = MEM_callocN(sizeof(bGPDlayer), "GPCopyPasteLayer");
- gpln->frames.first = gpln->frames.last = NULL;
+ BLI_listbase_clear(&gpln->frames);
BLI_strncpy(gpln->info, gpls->info, sizeof(gpln->info));
BLI_addtail(&gpcopybuf, gpln);
@@ -449,7 +449,7 @@ void paste_gpdata(Scene *scene)
}
/* if no strokes (i.e. new frame) added, free gpf */
- if (gpf->strokes.first == NULL)
+ if (BLI_listbase_is_empty(&gpf->strokes))
gpencil_layer_delframe(gpld, gpf);
}