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
This commit is contained in:
2021-04-14 10:03:14 +02:00
parent a425b2b25c
commit 9ca55b10b8

View File

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