[Bf-blender-cvs] [9ca55b10b8c] master: Fix T87479: GPencil SVG export outside of camera

Falk David noreply at git.blender.org
Wed Apr 14 10:14:18 CEST 2021


Commit: 9ca55b10b8cc78271a6266c4af473aa5fde493c6
Author: Falk David
Date:   Wed Apr 14 10:03:14 2021 +0200
Branches: master
https://developer.blender.org/rB9ca55b10b8cc78271a6266c4af473aa5fde493c6

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

===================================================================

M	source/blender/io/gpencil/intern/gpencil_io_base.cc

===================================================================

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);



More information about the Bf-blender-cvs mailing list