I am trying to render to a vector file using Freestyle. I have enabled it in my file and when I render to image via GUI, it generates both a PNG and an SVG file, so everything is OK. When I do it via command line (using the same file), it only generates the PNG file. This is the command that I'm using:

 --background x.blend --python blender_script.py -E BLENDER_EEVEE -o C:\\tmp\vector.svg -f 0

In blender_script.py I'm only changing the line weight.

How can I get the SVG file via command line (or editing the python script)


EDIT: It started working with this exact command line after I restarted Blender (maybe then it saved the settings related to Freestyle when I closed it?)

  • $\begingroup$ What exactly blender_script.py is doing? $\endgroup$ – brockmann Feb 13 at 11:51
  • $\begingroup$ It only changes the line thickness like this scene.render.line_thickness = 20.0 $\endgroup$ – Marc Feb 13 at 11:53
  • 1
    $\begingroup$ Set the extension to any supported image format like -o C:\\tmp\vector.png and the svg file comes along if freestyle svg addon is enabled. $\endgroup$ – brockmann Feb 13 at 12:03
  • $\begingroup$ It started working with the exact command line that I was using after I restarted Blender (maybe it saved the settings related to Freestyle when I closed it?) $\endgroup$ – Marc Feb 13 at 12:19
  • $\begingroup$ Not sure what do you mean by this comment, the only thing I can say is that it's working (I did test it) when using an extension that is regonized by blender @Marc $\endgroup$ – brockmann Feb 13 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.