Page MenuHome

SVG import: Match document units with Blender units
ClosedPublic

Authored by Michael Soluyanov (crantisz) on Feb 7 2019, 1:51 PM.

Details

Summary

Match SVG-document units with Blender units:

Test files with different SVG units:

Diff Detail

Event Timeline

Michael Soluyanov (crantisz) retitled this revision from Various improvements in svg import: 100x default scale to Various improvements in svg import: Match document units with Blender units.
Michael Soluyanov (crantisz) edited the summary of this revision. (Show Details)

Scale depends on scene units.

Jacques Lucke (JacquesLucke) requested changes to this revision.Feb 12 2019, 2:52 PM

Please make sure that you use the same code style as in other parts of the file.

This revision now requires changes to proceed.Feb 12 2019, 2:52 PM

Code styling and clearing

Michael Soluyanov (crantisz) retitled this revision from Various improvements in svg import: Match document units with Blender units to SVG import: Match document units with Blender units.Sep 10 2019, 8:22 AM

@Michael Soluyanov (crantisz) I have tested inserting your code in the modified add-on that supports grease pencil and it looks is working fine. Now the scale is correct. Anyway, in the new add-on, we have a parameter to define the final scale because the SVG sizes usually are very small for common Blender scenes. Testing with a scale of 1.0, works fine and gets the same size.

If @Jacques Lucke (JacquesLucke) thinks is ok, we could move the change to current master add-on and I will incorporate this change in my development version.

Example of GPencil object imported with scale=1.0. Left plane is 10 cm x 10 cm.

Haven't checked if the code works myself, but it's probably fine when you say it works.

If Jacques Lucke thinks is ok, we could move the change to current master add-on and I will incorporate this change in my development version.

Sure, that's fine. You can do the commit.

I have tested and works as expected. Not sure if the code has any issue. Anyway, the patch is ok with the code in development (no merge conflicts), so no problem to move it to master.

This revision is now accepted and ready to land.Sep 10 2019, 11:12 AM

I have tested and works as expected. Not sure if the code has any issue. Anyway, the patch is ok with the code in development (no merge conflicts), so no problem to move it to master.

Great! Thanks!