diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-07-29 23:30:48 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-07-29 23:30:48 +0300 |
commit | 5280d4bf0bf6e76d370bdf17d85299bcec608607 (patch) | |
tree | 78faee4ae80242edc869215b87e2502a79bc749d /source | |
parent | 8f05520083c3c71bf5a177048b4106f7237bae01 (diff) |
GPencil: Fix unreported problems painting after import SVG
After doing an import, the bounding box of the stroke was not calculated and any operation related to brushes (Sculpt, Weight Paint and Vertex Paint) was not working as expected because the bounding box of the stroke was wrong.
This problem was solved automatically after any edit operation, but must be solved in the import process.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/io/gpencil/intern/gpencil_io_import_svg.cc | 2 |
1 files changed, 2 insertions, 0 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 52fcc017ffb..db6bbc7768e 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_import_svg.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_import_svg.cc @@ -148,6 +148,8 @@ bool GpencilImporterSVG::read() for (bGPDspoint &pt : MutableSpan(gps->points, gps->totpoints)) { sub_v3_v3(&pt.x, gp_center); } + /* Calc stroke bounding box. */ + BKE_gpencil_stroke_boundingbox_calc(gps); } } } |