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:
Diffstat (limited to 'io_curve_svg/import_svg.py')
-rw-r--r--io_curve_svg/import_svg.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/io_curve_svg/import_svg.py b/io_curve_svg/import_svg.py
index 1b62ac1e..740dd817 100644
--- a/io_curve_svg/import_svg.py
+++ b/io_curve_svg/import_svg.py
@@ -1749,7 +1749,15 @@ class SVGGeometrySVG(SVGGeometryContainer):
rect = SVGRectFromNode(self._node, self._context)
- self._pushMatrix(self.getNodeMatrix())
+ matrix = self.getNodeMatrix()
+
+ # Better Inkscape compatibility: match document origin with
+ # 3D space origin.
+ if self._node.getAttribute('inkscape:version'):
+ document_height = float(self._node.getAttribute('height'))
+ matrix = matrix * Matrix.Translation([0.0, -document_height , 0.0])
+
+ self._pushMatrix(matrix)
self._pushRect(rect)
super()._doCreateGeom(False)