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
This commit is contained in:
Michael Soluyanov 2019-09-27 16:45:57 +02:00 committed by Antonio Vazquez
parent eba6fe23d3
commit 48ef856ed3
1 changed files with 1 additions and 4 deletions

View File

@ -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