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)
15 lines
404 B
Python
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()
|