I hope you’ll find this usefull! If you have problems, please let me know.
(Python is very new thing for me so there might be bizarre things in the script:o).
I’ve never had any trouble importing with the standard “paths” import script. Just save from Inkscape as “plain SVG”, use the standard import method, make sure to “scale on height” when asked, then once the object is imported, select it then enter “Control-a” to clear the rotation and then you can extrude the imported object or do whatever you want with it.
spyres,
I don’t think you need to write stuff like that. Ubuntuist tried hard and made script that alot of folks needed and you make it sound like he just wasted time making new SVG import.
Standard script that comes with Blender does not work correctly.
So thank you, Ubuntuist!!!
I’ve had pretty good luck with the inbuilt function. If there are glitches with it, I hope they fix that one rather than make us depend on yet another importer.
Inkscape2curve-script started
Traceback (most recent call last):
File "Text", line 257, in my_function
File "C:\Python24\Lib\xml\sax\expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "C:\Python24\Lib\xml\sax\xmlreader.py", line 123, in parse
self.feed(buffer)
File "C:\Python24\Lib\xml\sax\expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "C:\Python24\Lib\xml\sax\expatreader.py", line 379, in external_entity_re
f
self._source.getSystemId() or
File "C:\Python24\Lib\xml\sax\saxutils.py", line 293, in prepare_input_source
f = urllib.urlopen(source.getSystemId())
File "C:\Python24\lib\urllib.py", line 77, in urlopen
return opener.open(url)
File "C:\Python24\lib\urllib.py", line 185, in open
return getattr(self, name)(url)
File "C:\Python24\lib\urllib.py", line 308, in open_http
h.endheaders()
File "C:\Python24\Lib\httplib.py", line 795, in endheaders
self._send_output()
File "C:\Python24\Lib\httplib.py", line 676, in _send_output
self.send(msg)
File "C:\Python24\Lib\httplib.py", line 643, in send
self.connect()
File "C:\Python24\Lib\httplib.py", line 627, in connect
raise socket.error, msg
IOError: [Errno socket error] (10061, 'Connection refused')
JMS, if your script works perfectly, I doubt others would write their own.
From looking at your code theres some improvements you could make, tho that can be said of many scripts. -
The method your using is also less flexible sine your using an intermediate format… svg->obj->blender rather then directly importing svg.
Any data that SVG has that OBJ cant be imported this way.
Just saying “My Script Works Fine!” - is not an attitude that will help you find and remove bugs. Why dont you ask for the SVG that caused the problem so you can debug and fix it?
This new SVG importer looks promising and hopefully can support generic SVG’s some day.
In short, use some healthy competition to find out areas to improve and fix, rather then being overly negative.
When you open .blend file you will find path imported with Ubuntuist’s importer (smaller shape) and shape imported using JMS’s importer using obj as intermediate format (bigger shape, but you won’t find it because it’s awaaay from 0,0,0 and to find it you need to select all, if not selected, it’s not visible for some reason).
Ubuntuist’s importer does almost good job. Almost because shape was scaled by Y in Inkscape, but imported didn’t recognize scale and imported shape as if it would be not scaled.
JMS’s imported did crappy job. First of all why shape would be so off centered? Second of all why I can’t see it? Third - why does it have double vertices? The only good thing about it is that JMS’s importer recognized that fact that shape was scaled
And it is very very simple shape.
So I am really anxious to hear respond from both developers Thank you.
absurd : the script import the data at their right place, localized from the original page .
If the page is not centered in inkscape, they will not be in Blender too .
Second of all why I can’t see it?
if your svg file contents lines with thickness, the line are splited in the svg file .
Blender fills the space between this two lines . The import error would be to do not see the second line . To have a good svg export, remove the line thickness before .
Third - why does it have double vertices?
Same answer . It seems that you really do not know how the svg file works .
Gentlemen I think we have been down this road before…
In passing comments about Blender things it is important not to be insulting of another’s contributions to the community or make personal remarks and criticism.
I don’t think it would hurt to be a little more considerate with opinions before publishing them.
We are all on the same side I think…
Amazing, isn’t it ? As you can see there is an error in each imported curve ! And these were only simple paths without any complex command . More : there is no closed curve in the original svg file but all the curves have been closed in the import .
Ubuntuist,
SVG file I provided below, imports mirrored by Y axis. Why is it so?
JMS,
I really don’t care about SVG files from OpenClipart, because I usually need to use my own SVG files. And since your importer is not working correctly, what do you want me to agree with?!
“…if your svg file contents lines with thickness…”
I don’t care about line thickness. If I have a single stroke, I want to see single path in Blender. That’s just a logically correct. If somebody needs “thick” line, then they have to design it properly. Here is SVG to show what I mean:
A is single stroke, no matter how thick it is in SVG, B is “thick line”. So that’s proper design
And artist doesn’t need to know how SVG work in order to use Inkscape + Blender. Have you heard of WYSIWYG? That’s how it suppose to be. If you have a stroke in InkScape and it has thickness, it suppose to be imported either as single path or to converted to path and to become closed contour. But no double vertices please.
No comment . There is no double vertices in the import made by my script .
Have you heard of WYSIWYG?
And you ? did you heard of WYEIWYI ?
What You Export (from inkscape), Is What You Import (in blender)
That’s how it suppose to be.
In fact, what is supposed to be is that you know what you want to export . If you want to import a single path in blender try to learn how to export this sole path from inkscape .