diff options
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 131fb38e816..a942e694f2e 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -87,6 +87,10 @@ //XXX #include "BIF_previewrender.h" //XXX #include "BIF_editseq.h" +#ifdef WITH_FREESTYLE +# include "FRS_freestyle_config.h" +#endif + #ifdef WIN32 #else #include <sys/time.h> @@ -207,6 +211,18 @@ Scene *BKE_scene_copy(Scene *sce, int type) /* remove animation used by sequencer */ if (type != SCE_COPY_FULL) remove_sequencer_fcurves(scen); + +#ifdef WITH_FREESTYLE + { + SceneRenderLayer *srl, *new_srl; + + new_srl = scen->r.layers.first; + for (srl = sce->r.layers.first; srl; srl = srl->next) { + FRS_copy_freestyle_config(&new_srl->freestyleConfig, &srl->freestyleConfig); + new_srl = new_srl->next; + } + } +#endif } /* tool settings */ @@ -335,6 +351,16 @@ void BKE_scene_free(Scene *sce) sce->r.ffcodecdata.properties = NULL; } +#ifdef WITH_FREESTYLE + { + SceneRenderLayer *srl; + + for (srl = sce->r.layers.first; srl; srl = srl->next) { + FRS_free_freestyle_config(&srl->freestyleConfig); + } + } +#endif + BLI_freelistN(&sce->markers); BLI_freelistN(&sce->transform_spaces); BLI_freelistN(&sce->r.layers); @@ -1273,6 +1299,9 @@ SceneRenderLayer *BKE_scene_add_render_layer(Scene *sce, const char *name) srl->lay = (1 << 20) - 1; srl->layflag = 0x7FFF; /* solid ztra halo edge strand */ srl->passflag = SCE_PASS_COMBINED | SCE_PASS_Z; +#ifdef WITH_FREESTYLE + FRS_init_freestyle_config(&srl->freestyleConfig); +#endif return srl; } |