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.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 4038dd2d165..67fc5bd5dca 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -110,6 +110,9 @@
#include "BKE_text.h"
#include "BKE_texture.h"
#include "BKE_world.h"
+#ifdef WITH_FREESTYLE
+# include "BKE_linestyle.h"
+#endif
#include "RNA_access.h"
@@ -279,6 +282,10 @@ bool id_make_local(ID *id, bool test)
return false; /* can't be linked */
case ID_GD:
return false; /* not implemented */
+#ifdef WITH_FREESTYLE
+ case ID_LS:
+ return 0; /* not implemented */
+#endif
}
return false;
@@ -377,6 +384,11 @@ bool id_copy(ID *id, ID **newid, bool test)
case ID_MSK:
if (!test) *newid = (ID *)BKE_mask_copy((Mask *)id);
return true;
+#ifdef WITH_FREESTYLE
+ case ID_LS:
+ if(!test) *newid= (ID*)FRS_copy_linestyle((FreestyleLineStyle*)id);
+ return 1;
+#endif
}
return false;
@@ -507,6 +519,10 @@ ListBase *which_libbase(Main *mainlib, short type)
return &(mainlib->movieclip);
case ID_MSK:
return &(mainlib->mask);
+#ifdef WITH_FREESTYLE
+ case ID_LS:
+ return &(mainlib->linestyle);
+#endif
}
return NULL;
}
@@ -597,6 +613,9 @@ int set_listbasepointers(Main *main, ListBase **lb)
lb[a++] = &(main->wm);
lb[a++] = &(main->movieclip);
lb[a++] = &(main->mask);
+#ifdef WITH_FREESTYLE
+ lb[a++] = &(main->linestyle);
+#endif
lb[a] = NULL;
@@ -715,6 +734,11 @@ static ID *alloc_libblock_notest(short type)
case ID_MSK:
id = MEM_callocN(sizeof(Mask), "Mask");
break;
+#ifdef WITH_FREESTYLE
+ case ID_LS:
+ id = MEM_callocN(sizeof(FreestyleLineStyle), "Freestyle Line Style");
+ break;
+#endif
}
return id;
}
@@ -950,6 +974,11 @@ void BKE_libblock_free(ListBase *lb, void *idv)
case ID_MSK:
BKE_mask_free(bmain, (Mask *)id);
break;
+#ifdef WITH_FREESTYLE
+ case ID_LS:
+ FRS_free_linestyle((FreestyleLineStyle *)id);
+ break;
+#endif
}
BLI_remlink(lb, id);