diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-04-02 14:45:51 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-04-02 14:45:58 +0300 |
commit | e7a0a75919fd2e33869b4b8efbf0e69bf5904ea7 (patch) | |
tree | 7930608d2fe2787532a0c560a73d03e737b5d562 /source/blender/io | |
parent | 548d16d4a50ba5cdd2d6aa7e62a9ca86ef6d24b0 (diff) |
Fix T87131: SVG as GPencil elements with both Stroke and Fill fails
The importer was not checking if both were enabled. Now a new material is created if it's needed.
Diffstat (limited to 'source/blender/io')
-rw-r--r-- | source/blender/io/gpencil/intern/gpencil_io_import_svg.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/io/gpencil/intern/gpencil_io_import_svg.cc b/source/blender/io/gpencil/intern/gpencil_io_import_svg.cc index 4894cfc1ada..dc76b6ed661 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_import_svg.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_import_svg.cc @@ -118,15 +118,17 @@ bool GpencilImporterSVG::read() } /* Create_shape materials. */ - const char *const mat_names[] = {"Stroke", "Fill"}; + const char *const mat_names[] = {"Stroke", "Fill", "Both"}; int index = 0; - if ((is_stroke) && (is_fill)) { + if ((is_stroke) && (!is_fill)) { index = 0; - is_fill = false; } else if ((!is_stroke) && (is_fill)) { index = 1; } + else if ((is_stroke) && (is_fill)) { + index = 2; + } int32_t mat_index = create_material(mat_names[index], is_stroke, is_fill); /* Loop all paths to create the stroke data. */ |