Following up to D15615, I noticed that many messages are either
properly extracted, but not translated due to the use of printf-style
formatting in strings, or not extracted at all. Using the pgettext
function explicitly before formatting fixes that.
Since the affected messages are already extracted, no additional work
is needed from translators.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D16373
Refactor the matrix stack in a way that does not require matrix
inversion. Basically, store the state of the final transform in
the stack.
Technically this makes regression test to fail with Blender Icons,
but the new code gives more correct icons. So the reference image
is to simply be regenerated.
Don't change current point coordinate for implicit path close.
This can fix some broken paths in T92713.
Differential Revision: https://developer.blender.org/D16198
This can fix some broken paths in T92713, like the following PeerTube icon.
| before | now
| {F13615071} | {F13615072}
But some icons are still incomplete due to other issues.
Differential Revision: https://developer.blender.org/D16143
When importing an SVG file that uses skewX and skewY, they are swapped.
This patch swaps the skewX and skewY functions and hence the problem is resolved.
Differential Revision: https://developer.blender.org/D13036
The rectangle shape was not using the `id` as the object name when
importing. All other shapes are doing it this way already.
The patch calls `id_names_from_node` to set the name to the `id`.
Credits go to @ariejdl.
Reviewed By: sergey
Maniphest Tasks: T88651
Differential Revision: https://developer.blender.org/D11429
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
The file saved as Inkscape SVG moved to the top, regular SVG stays in place. Blender checks if SVG have an special attribute `inkscape:version`, and if it has one, it move all SVG to the top. The idea is to match bottom right corner with world origin, instead top right corner:
But why height is not equal the real height of the SVG? Well, because it's not a height of SVG itself, it is size of SVG on printing or displaying in web-page or in previewer. The real height of SVG in SVG-units is located in viewbox attribute:
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox
So I suggest to move SVG content to real height of SVG located in viewbox attribute:
Reviewers: sergey, antoniov
Reviewed By: antoniov
Subscribers: meta-androcto, antoniov, jms, sergey
Tags: #add-ons
Differential Revision: https://developer.blender.org/D5727
rBbc5b0f7a091c changed the default fill mode for curves.
Instead of being "fill" it is now "none".
The creates a problem because the svg importer seems to rely on curves being filled by default.
This diff should fix it.
(Note that this is my first patch)
Reviewers: sergey, mont29
Reviewed By: mont29
Subscribers: mont29
Differential Revision: https://developer.blender.org/D4582
Some SVG exporters outputs small values in an exponential
notation. There is no big reason to reject those files.
This change makes it so any notation of the value is accepted.
Only do it in the path point parsing, since other areas are
already dealing with this correct.
Also covered the array parsing covered with a unit test which
can be run as a stand-alone application.
The parsing code is from Jacques Lucke, thanks!
Differential Revision: https://developer.blender.org/D4234
Made some tweaks to transformation matrix of <svg> node to make
it so origin from Inkscape matches Blender origin.
Currently only affects files from Inkscape, for others it's not
so much clear what origin should be.
Based on the patch from aldero (juanC), thanks!
Apparently internally SVG importer was using 90 points per blender unit,
not per inch. This made files importing with unexpectable dimensions
which could be really harmful if you're importing blueprints as references.
Now SVG importer is using 90 points per inch, which makes imported files
has correct dimensions in both Metric and Imperal unit systems.
However, there's one possible downside -- imported files would look
smaller in blender units system.