[Bf-extensions-cvs] [fb01dd9] master: Fix document height parsing when height contains units
Sergey Sharybin
noreply at git.blender.org
Tue May 13 16:47:41 CEST 2014
Commit: fb01dd9e549de60ff34585d10f8bc3ecb5025ed8
Author: Sergey Sharybin
Date: Tue May 13 16:47:01 2014 +0200
https://developer.blender.org/rBAfb01dd9e549de60ff34585d10f8bc3ecb5025ed8
Fix document height parsing when height contains units
===================================================================
M io_curve_svg/import_svg.py
===================================================================
diff --git a/io_curve_svg/import_svg.py b/io_curve_svg/import_svg.py
index 740dd81..e114ca3 100644
--- a/io_curve_svg/import_svg.py
+++ b/io_curve_svg/import_svg.py
@@ -1754,7 +1754,8 @@ class SVGGeometrySVG(SVGGeometryContainer):
# Better Inkscape compatibility: match document origin with
# 3D space origin.
if self._node.getAttribute('inkscape:version'):
- document_height = float(self._node.getAttribute('height'))
+ raw_height = self._node.getAttribute('height')
+ document_height = SVGParseCoord(raw_height, 1.0)
matrix = matrix * Matrix.Translation([0.0, -document_height , 0.0])
self._pushMatrix(matrix)
More information about the Bf-extensions-cvs
mailing list