labs. bfloch.com/script/Archives for: May 2009, 10
private.  
/script /output
/links
/about



 »    
09/May/10
fusion, script, status

 
» Cooking SVG Importer

Some geek info about the importer…

As you may have noticed from various sources I’m working on a SVG importer/translator script for fusion. I wrote a prototype in Qt (C++) and decided to rewrite it in plain python.

The status so far is that XML Parsing is mostly done and the linked lists are build. There are some steps needed to apply all transformation matrices to the path object which can be kind of tricky. I’ve ignored this step in the prototype to only parse paths within one path or without transformation. Actually you would need to merge down all paths to a single path which can be easily done within Illustrator. But I want allow support for conventional SVGs so “I will do the math".

On the other hand I won’t support color and gradient data. Also different shapes besides paths / polyshapes (B-Splines) will be ignored. The importer is written object oriented though so more SVG features can be added in future by myself or others.

Here again the screenshot from the working prototype. Since I’ve dropped Qt / pyQt for this tool there won’t be a nice preview in the final version. I didn’t want to force people to install pyQt to use this (yet ;)). But the script is planned to be usable as commandline script so you can embed it into your pipeline or do batch conversion.

..................................................