From 68ad532092fcd516092711992b2c72fbf6ae04e8 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin <sergey.vfx@gmail.com> Date: Tue, 22 Feb 2011 21:36:24 +0000 Subject: [PATCH] SVG format fixes: - Fixed silly error caused by copy-pasteing code from class (accessing to self from simple function) - Fix for illustrator path format -- it doesn't place spaces before "minus" sign of next number. Maybe it's time to go out from stypid string replacement-splitting to slower but smarter token parser? --- io_curve_svg/import_svg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io_curve_svg/import_svg.py b/io_curve_svg/import_svg.py index 19cd5d5d6..7d34ab633 100644 --- a/io_curve_svg/import_svg.py +++ b/io_curve_svg/import_svg.py @@ -323,7 +323,7 @@ def SVGParseStyles(node, context): return styles if styles['useFill'] is None: - fill = self._node.getAttribute('fill') + fill = node.getAttribute('fill') if fill: fill = fill.lower() if fill == 'none': @@ -354,7 +354,7 @@ class SVGPathData: """ # Convert to easy-to-parse format - d = d.replace(',', ' ') + d = d.replace(',', ' ').replace('-', ' -') d = re.sub('([A-z])', ' \\1 ', d) self._data = d.split() -- GitLab