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/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 8208cca981e..3f80674bf60 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -108,7 +108,9 @@
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
#include "DNA_lamp_types.h"
-#include "DNA_linestyle_types.h"
+#ifdef WITH_FREESTYLE
+# include "DNA_linestyle_types.h"
+#endif
#include "DNA_meta_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
@@ -2160,8 +2162,6 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
TimeMarker *marker;
TransformOrientation *ts;
SceneRenderLayer *srl;
- FreestyleModuleConfig *fmc;
- FreestyleLineSet *fls;
ToolSettings *tos;
sce= scebase->first;
@@ -2289,14 +2289,21 @@ static void write_scenes(WriteData *wd, ListBase *scebase)
for (srl = sce->r.layers.first; srl; srl = srl->next) {
writestruct(wd, DATA, "SceneRenderLayer", 1, srl);
- for(fmc = srl->freestyleConfig.modules.first; fmc; fmc = fmc->next) {
- writestruct(wd, DATA, "FreestyleModuleConfig", 1, fmc);
- }
+#ifdef WITH_FREESTYLE
+ {
+ FreestyleModuleConfig *fmc;
+ FreestyleLineSet *fls;
+
+ for(fmc = srl->freestyleConfig.modules.first; fmc; fmc = fmc->next) {
+ writestruct(wd, DATA, "FreestyleModuleConfig", 1, fmc);
+ }
- for(fls = srl->freestyleConfig.linesets.first; fls; fls = fls->next) {
- writestruct(wd, DATA, "FreestyleLineSet", 1, fls);
- }
+ for(fls = srl->freestyleConfig.linesets.first; fls; fls = fls->next) {
+ writestruct(wd, DATA, "FreestyleLineSet", 1, fls);
+ }
+ }
+#endif
}
if (sce->nodetree) {
@@ -2876,6 +2883,7 @@ static void write_masks(WriteData *wd, ListBase *idbase)
mywrite(wd, MYWRITE_FLUSH, 0);
}
+#ifdef WITH_FREESTYLE
static void write_linestyle_color_modifiers(WriteData *wd, ListBase *modifiers)
{
LineStyleModifier *m;
@@ -3076,6 +3084,7 @@ static void write_linestyles(WriteData *wd, ListBase *idbase)
}
}
}
+#endif
/* context is usually defined by WM, two cases where no WM is available:
* - for forward compatibility, curscreen has to be saved
@@ -3183,7 +3192,9 @@ static int write_file_handle(Main *mainvar, int handle, MemFile *compare, MemFil
write_brushes (wd, &mainvar->brush);
write_scripts (wd, &mainvar->script);
write_gpencils (wd, &mainvar->gpencil);
+#ifdef WITH_FREESTYLE
write_linestyles(wd, &mainvar->linestyle);
+#endif
write_libraries(wd, mainvar->next);
if (write_user_block) {