SVG output script

Yeah, freestyle svg export is good. But theres a lot to be defined up front. Your Addon just exports everything and i can use what i need in my vector application and merge/discard the rest. Much easier for me.

This script should be in the Blender trunk.

Keep on!

1 Like

One of the problems, for me, with the freestyle svg export is that the lines/shapes are not connected – it makes cleanup in Adobe Illustrator much more difficult and time consuming.

1 Like

After struggling with getting Maya to output unusable AI files, finding this addon and figuring out how to use it is great!

It would be really nice if this addon saved its settings in the blend file(I’m using Blender 2.8).

Attempting to use this much needed and valued Addon, but I just generated an error:
Any suggestion or clarification?? Thank you.

File “C:\Users\paulhart\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\export_svg_280.py”, line 615, in execute
vis = e.calc_face_angle() > wm.stroke_ang
ValueError: BMEdge.calc_face_angle(): edge doesn’t use 2 faces

paulhart2, did a simple change to bypass the error, but pm me a blend file later if it doesn’t work
found some other bug in the meantime, no time to work on it now

hi obsurveyor, yes it could be useful, I had a basic presets system working at one moment

liero, Thank you for the effort, I look forward to it working. Any other changes, let me know. I will ‘compare’ this new script to the old one to better understand.
Just checked the revision, and wanted to note and thank you for ‘incrementing’ the version, it helps manage changes.
“version”: (0, 2, 1, 1),
I had a chance to test it on the current scene, which may be too complex for testing, as it only output some objects, unrelated to my selection or menu options, as I could determine.
I had to reduce the number that you had put into the code from 1.5708 to .25, just as a test and it did generate some objects. I do not know enough to understand how to make it better, as I have no idea why your number was chosen. Great idea. I hope I can get it to work on a simpler file. Perhaps you have other ideas?
Gracias, back to dibujo :_>)
I was fascinated to find Spanish Commands in the script, fun to try to understand.

With my minor change, and the latest 2.81 build, it did output a SVG, now I can work on customizing what gets created, but it appears to work as intended. Thank you again.

the link dose not working please help

This is link working. SVG output script

thanks for your respond, but it dose not work :confused:

hi rafek the links works fine for me… maybe try this one: https://pastebin.com/Z4ittuvC
download file and install or paste inside blender script editor and run

it works good :grinning: thank you, would you please send me a link to the 2.7 version?
and I just want to know why the main link dose not work for me? if there any other update dose tne link you sent it will be updated?

Thank you all. Sorry for the link to the non-working version.

Bug in 2.82

Traceback (most recent call last):
  File "\io_export_svg_280.py", line 284, in execute
    objeto_2_bm(context, o, mes, linea)
  File "\io_export_svg_280.py", line 130, in objeto_2_bm
    tmp = obj.to_mesh(context.view_layer.depsgraph, apply_modifiers=True) ###
TypeError: Object.to_mesh(): required parameter "preserve_all_data_layers" to be a keyword argument!

location: <unknown location>:-1


hi mkbreuer thanks for the report -had no errors here though-
did a little fix to make it work correctly in 2.8x

1 Like

I made a fast export test!
It works! Thank you!

But it always export the oppsite of the View as front!?
Is it possible to add a render direction selection?

Can this work to export an animated .svg?

hi David, if you mean animation as in a svg sequence then it should work, there’s a sequence button there that Atom added… but set variation to 0 as it will wiggle the color if you don’t

Can a mesh with just edges be exported as vector lines?
When I am trying to do it I am getting a blank SVG file.

If I convert the same object (with just edges) to a curve it gets exported but When the the converted curve is exported all islands get joined like this. It’s easy to fix if it’s a simple object/graphics like this but is very difficult for a complex one.

Is there any way to export curve and avoid the extra lines?

hi saiko, converting edges to curves in blender is the way to go, then enabling ‘overay bezier’ in addon… (it’s on by default I think)
problem is that your converted curve segments will be the ‘poly’ type and that’s not supported by the script

edit: just had a look, bezier Overlay is off by default, need to enable it in addon…
then select all points in your curve in edit mode and run Curve > Set Spline Type > Bezier
then you should be able to export it… remeber it still exports edges but just delete layer in vector editing software

1 Like