I was wondering if there is a way to import a raw SVG string using bpy rather than importing a file. The reason is that I have the data available in a database. I could write a file and import it but I rather skip that step, if possible.


What I would like to do in the end is use the SVG data to make an extruded object in Blender. The expected SVG elements will be shapes (rect, path, polygon, ...).

  • $\begingroup$ SVG is just xml. You could just parse it as you would an xml and put the data where you want it. Is that what you're trying to do? $\endgroup$ – cmomoney Dec 15 '16 at 16:56
  • $\begingroup$ I updated my question to clarify what I am aiming for. I could use SVG.js for example to pre-process the SVG data. With the toPath and toPoly plugins, all SVG elements can be converted to polygons so I could use the point data to build a mesh in Blender. Using the SVG data as is in Blender will be easier though :) $\endgroup$ – wout Dec 15 '16 at 18:15

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.