[Bf-extensions-cvs] [48ef856e] master: Fix D4319 (scaling of svg in different page scales)
Michael Soluyanov
noreply at git.blender.org
Fri Sep 27 16:49:12 CEST 2019
Commit: 48ef856ed3c42d54535444ec2d62b978b6f3506b
Author: Michael Soluyanov
Date: Fri Sep 27 16:45:57 2019 +0200
Branches: master
https://developer.blender.org/rBA48ef856ed3c42d54535444ec2d62b978b6f3506b
Fix D4319 (scaling of svg in different page scales)
Looks like my code in https://developer.blender.org/D4319 apply SVG scaling second time.. sorry
This is fix of it
Test files 10cm rect with different page scale:
{F7777057}
{F7777056}
Must be same size
Reviewers: antoniov
Differential Revision: https://developer.blender.org/D5917
===================================================================
M io_curve_svg/import_svg.py
===================================================================
diff --git a/io_curve_svg/import_svg.py b/io_curve_svg/import_svg.py
index 0742bc4e..013b5bc5 100644
--- a/io_curve_svg/import_svg.py
+++ b/io_curve_svg/import_svg.py
@@ -1757,11 +1757,8 @@ class SVGGeometrySVG(SVGGeometryContainer):
if len(viewbox) == 4 and unit in ('cm', 'mm', 'in', 'pt', 'pc'):
- #one unit equals whis svg units:
- unitscale = document_height / (viewbox[3] - viewbox[1])
-
#convert units to BU:
- unitscale = unitscale * units[unit] / 90 * 1000 / 39.3701
+ unitscale = units[unit] / 90 * 1000 / 39.3701
#apply blender unit scale:
unitscale = unitscale / bpy.context.scene.unit_settings.scale_length
More information about the Bf-extensions-cvs
mailing list