Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--io_curve_svg/import_svg.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/io_curve_svg/import_svg.py b/io_curve_svg/import_svg.py
index 3881a619..3122df91 100644
--- a/io_curve_svg/import_svg.py
+++ b/io_curve_svg/import_svg.py
@@ -29,16 +29,18 @@ from . import svg_colors
#### Common utilities ####
-# TODO: 'em' and 'ex' aren't actually supported
-SVGUnits = {'': 1.0,
- 'px': 1.0,
- 'in': 90,
- 'mm': 90 / 25.4,
- 'cm': 90 / 2.54,
- 'pt': 1.25,
- 'pc': 15.0,
- 'em': 1.0,
- 'ex': 1.0}
+# TODO: "em" and "ex" aren't actually supported
+SVGUnits = {"": 1.0,
+ "px": 1.0,
+ "in": 90,
+ "mm": 90 / 25.4,
+ "cm": 90 / 2.54,
+ "pt": 1.25,
+ "pc": 15.0,
+ "em": 1.0,
+ "ex": 1.0,
+ "INVALID": 1.0, # some DocBook files contain this
+ }
SVGEmptyStyles = {'useFill': None,
'fill': None}
@@ -289,7 +291,7 @@ def SVGTransformTranslate(params):
"""
tx = float(params[0])
- ty = float(params[1])
+ ty = float(params[1]) if len(params) > 1 else 0.0
return Matrix.Translation(Vector((tx, ty, 0.0)))