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/library.c')
-rw-r--r--source/blender/blenkernel/intern/library.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 3f287a7c9cc..56480434b70 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -95,6 +95,7 @@
#include "BKE_lamp.h"
#include "BKE_lattice.h"
#include "BKE_library.h"
+#include "BKE_linestyle.h"
#include "BKE_mesh.h"
#include "BKE_material.h"
#include "BKE_main.h"
@@ -281,6 +282,8 @@ bool id_make_local(ID *id, bool test)
return false; /* can't be linked */
case ID_GD:
return false; /* not implemented */
+ case ID_LS:
+ return 0; /* not implemented */
}
return false;
@@ -379,6 +382,9 @@ bool id_copy(ID *id, ID **newid, bool test)
case ID_MSK:
if (!test) *newid = (ID *)BKE_mask_copy((Mask *)id);
return true;
+ case ID_LS:
+ if (!test) *newid = (ID *)BKE_copy_linestyle((FreestyleLineStyle *)id);
+ return 1;
}
return false;
@@ -509,6 +515,8 @@ ListBase *which_libbase(Main *mainlib, short type)
return &(mainlib->movieclip);
case ID_MSK:
return &(mainlib->mask);
+ case ID_LS:
+ return &(mainlib->linestyle);
}
return NULL;
}
@@ -599,6 +607,7 @@ int set_listbasepointers(Main *main, ListBase **lb)
lb[a++] = &(main->wm);
lb[a++] = &(main->movieclip);
lb[a++] = &(main->mask);
+ lb[a++] = &(main->linestyle);
lb[a] = NULL;
@@ -717,6 +726,9 @@ static ID *alloc_libblock_notest(short type)
case ID_MSK:
id = MEM_callocN(sizeof(Mask), "Mask");
break;
+ case ID_LS:
+ id = MEM_callocN(sizeof(FreestyleLineStyle), "Freestyle Line Style");
+ break;
}
return id;
}
@@ -952,6 +964,9 @@ void BKE_libblock_free(ListBase *lb, void *idv)
case ID_MSK:
BKE_mask_free(bmain, (Mask *)id);
break;
+ case ID_LS:
+ BKE_free_linestyle((FreestyleLineStyle *)id);
+ break;
}
BLI_remlink(lb, id);