This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/release/scripts/startup/freestyle_builtins.py
Tamito Kajiyama 61a330baca Freestyle: Built-in SVG exporter.
Features:
* Both still image and animation rendering, as well as polygon
  fills are supported.
* The exporter creates a new SVG layer for every Freestyle line
  set. The different layers are correctly sorted.
* SVG paths use data from line styles, so the base color of a
  line style becomes the color of paths, idem for dashes and
  stroke thickness.
* Strokes can be split at invisible parts.  This functionality is
  useful when exporting for instance dashed lines or line styles
  with a Blue Print shader
* The exporter can be used not only in the Parameter Editor mode,
  but also from within style modules written for the Python
  Scripting mode.

Acknowledgements:
The author would like to thank Francesco Fantoni and Jarno
Leppänen for their [[ https://github.com/hvfrancesco/freestylesvg | Freestyle SVG exporter ]].

Differential revision: https://developer.blender.org/D785

Author: flokkievids (Folkert de Vries)

Reviewed by: kjym3 (Tamito Kajiyama)
2014-10-18 18:35:29 +09:00

15 lines
404 B
Python

import bpy
from svg_export import svg_export_header, svg_export_animation
def register():
bpy.app.handlers.render_init.append(svg_export_header)
bpy.app.handlers.render_complete.append(svg_export_animation)
def unregister():
bpy.app.handlers.render_init.remove(svg_export_header)
bpy.app.handlers.render_complete.remove(svg_export_animation)
if __name__ == '__main__':
register()