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 942e71b5052..7a33d94b3dc 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -109,6 +109,7 @@
#include "BKE_speaker.h"
#include "BKE_movieclip.h"
#include "BKE_mask.h"
+#include "BKE_linestyle.h"
#include "RNA_access.h"
@@ -268,6 +269,8 @@ int id_make_local(ID *id, int test)
return 0; /* can't be linked */
case ID_GD:
return 0; /* not implemented */
+ case ID_LS:
+ return 0; /* not implemented */
}
return 0;
@@ -362,6 +365,9 @@ int id_copy(ID *id, ID **newid, int test)
case ID_MSK:
if (!test) *newid = (ID *)BKE_mask_copy((Mask *)id);
return 1;
+ case ID_LS:
+ if(!test) *newid= (ID*)FRS_copy_linestyle((FreestyleLineStyle*)id);
+ return 1;
}
return 0;
@@ -492,6 +498,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;
}
@@ -576,6 +584,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;
@@ -690,6 +699,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;
}
@@ -914,6 +926,9 @@ void BKE_libblock_free(ListBase *lb, void *idv)
case ID_MSK:
BKE_mask_free(bmain, (Mask *)id);
break;
+ case ID_LS:
+ FRS_free_linestyle((FreestyleLineStyle *)id);
+ break;
}
BLI_remlink(lb, id);