[Bf-scripts-dev] UV->SVG export and SVG->UV import

Melchior FRANZ melchior.franz at gmail.com
Wed Mar 5 14:01:02 CET 2008


From my complaints on bf-funboard you know that I'm not totally
satisfied with Blender's UV manipulation possibilities. :-)
I fixed the limited and limiting packing functions with a script,
but there were still other problems: the SVG exporter gives a
damn about my selection and exports only on, the active object,
and it's very bothersome to do any manual packing, as there's only
one UV outline visible in the UV editor. That's how I solved the
problems:

uv_export_svg.py:
- saves all selected objects to an SVG file
- every object and every group of adjacent faces therein is a
  separate SVG group
- object and mesh names are exported
- output is properly tab-indented  :-)

uv_import_svg.py:
- imports an SVG file as saved by uv_export_svg.py -- all objects
  listed in the file are updated in Blender, independent of what
  is selected at the moment
- all transforms are considered, so you can move object outlines
  around in an SVG editor like Inkscape, you can rotate the outlines,
  scale them, etc. This allows much finer control over the packing,
  which isn't possible in Blender, if you can only see one object
  outline at the same time.


All scripts available here:
  http://cvs.flightgear.org/cgi-bin/viewvc/viewvc.cgi/FlightGear/utils/Modeller/

There are probably still bugs. I haven't used the scripts for
actual work, but only for testing. Comments and suggestions
welcome, as always.

Normally, I would have extended the existing UV exporter script
and submitted a patch, but that script seems to be the protagonist
of the script review effort, and I wanted to get something done,
not get involved in a discussion.  :-}

m.


More information about the Bf-scripts-dev mailing list