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/blenkernel/intern/freestyle.c')
-rw-r--r--source/blender/blenkernel/intern/freestyle.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/freestyle.c b/source/blender/blenkernel/intern/freestyle.c
index f5a9ba4e241..2ab49538ba2 100644
--- a/source/blender/blenkernel/intern/freestyle.c
+++ b/source/blender/blenkernel/intern/freestyle.c
@@ -195,6 +195,21 @@ FreestyleLineSet *BKE_freestyle_lineset_add(FreestyleConfig *config)
return lineset;
}
+bool BKE_freestyle_lineset_delete(FreestyleConfig *config, FreestyleLineSet *lineset)
+{
+ if (BLI_findindex(&config->linesets, lineset) == -1)
+ return false;
+ if (lineset->group) {
+ lineset->group->id.us--;
+ }
+ if (lineset->linestyle) {
+ lineset->linestyle->id.us--;
+ }
+ BLI_remlink(&config->linesets, lineset);
+ MEM_freeN(lineset);
+ return true;
+}
+
FreestyleLineSet *BKE_freestyle_lineset_get_active(FreestyleConfig *config)
{
FreestyleLineSet *lineset;