diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-05-24 13:36:13 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-05-24 13:36:13 +0300 |
commit | 24004e74fa442a1b817180e62aefe5d4d526f406 (patch) | |
tree | d2e2048f7a8278cfa5dc9b85d150cb15802b036c /source/blender/io/gpencil/intern/gpencil_io_capi.cc | |
parent | 43153e2324548102ff47eb3ce97db2b59ae26ef4 (diff) |
Fix T88524: GPencil PDF does not take into account the marker camera
The camera was not checked before doing the export.
Diffstat (limited to 'source/blender/io/gpencil/intern/gpencil_io_capi.cc')
-rw-r--r-- | source/blender/io/gpencil/intern/gpencil_io_capi.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/io/gpencil/intern/gpencil_io_capi.cc b/source/blender/io/gpencil/intern/gpencil_io_capi.cc index 8093ec3c52d..544c51e0b4f 100644 --- a/source/blender/io/gpencil/intern/gpencil_io_capi.cc +++ b/source/blender/io/gpencil/intern/gpencil_io_capi.cc @@ -121,7 +121,7 @@ static bool gpencil_io_export_pdf(Depsgraph *depsgraph, CFRA = i; BKE_scene_graph_update_for_newframe(depsgraph); - exporter->prepare_camera_params(iparams); + exporter->prepare_camera_params(scene, iparams); exporter->frame_number_set(i); exporter->add_newpage(); exporter->add_body(); @@ -130,10 +130,11 @@ static bool gpencil_io_export_pdf(Depsgraph *depsgraph, /* Back to original frame. */ exporter->frame_number_set(iparams->frame_cur); CFRA = iparams->frame_cur; + BKE_scene_camera_switch_update(scene); BKE_scene_graph_update_for_newframe(depsgraph); } else { - exporter->prepare_camera_params(iparams); + exporter->prepare_camera_params(scene, iparams); exporter->add_newpage(); exporter->add_body(); result = exporter->write(); @@ -146,6 +147,7 @@ static bool gpencil_io_export_pdf(Depsgraph *depsgraph, /* Export current frame in SVG. */ #ifdef WITH_PUGIXML static bool gpencil_io_export_frame_svg(GpencilExporterSVG *exporter, + Scene *scene, const GpencilIOParams *iparams, const bool newpage, const bool body, @@ -153,7 +155,7 @@ static bool gpencil_io_export_frame_svg(GpencilExporterSVG *exporter, { bool result = false; exporter->frame_number_set(iparams->frame_cur); - exporter->prepare_camera_params(iparams); + exporter->prepare_camera_params(scene, iparams); if (newpage) { result |= exporter->add_newpage(); @@ -189,7 +191,7 @@ bool gpencil_io_export(const char *filename, GpencilIOParams *iparams) #ifdef WITH_PUGIXML case GP_EXPORT_TO_SVG: { GpencilExporterSVG exporter = GpencilExporterSVG(filename, iparams); - return gpencil_io_export_frame_svg(&exporter, iparams, true, true, true); + return gpencil_io_export_frame_svg(&exporter, scene_, iparams, true, true, true); break; } #endif |