From 9ca55b10b8cc78271a6266c4af473aa5fde493c6 Mon Sep 17 00:00:00 2001 From: Falk David Date: Wed, 14 Apr 2021 10:03:14 +0200 Subject: [PATCH] Fix T87479: GPencil SVG export outside of camera When trying to export a GPencil object to SVG from outside the camera view, the expoted file would contain invalid data. This was because the calculation of the bounding box did not have any objects to iterate over. The fix makes sure we create the object list before trying to calculate the bounding box. Reviewed By: antoniov Maniphest Tasks: T87479 Differential Revision: https://developer.blender.org/D10975 --- source/blender/io/gpencil/intern/gpencil_io_base.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.cc b/source/blender/io/gpencil/intern/gpencil_io_base.cc index 8da1ec27b9c..c60055eccaf 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_base.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_base.cc @@ -120,6 +120,8 @@ GpencilIO::GpencilIO(const GpencilIOParams *iparams) offset_.x = 0.0f; offset_.y = 0.0f; + create_object_list(); + selected_objects_boundbox_calc(); rctf boundbox; selected_objects_boundbox_get(&boundbox);