Blender V5.3
grease_pencil_io.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#include "BLI_string_ref.hh"
6
7#include "DNA_view3d_types.h"
8
9namespace blender {
10
11#pragma once
12
16
17struct ARegion;
18struct Depsgraph;
19struct View3D;
20struct bContext;
21struct Scene;
22struct ReportList;
24
25struct IOContext {
29 const View3D *v3d;
32 Depsgraph *depsgraph;
33
35 const ARegion *region,
36 const View3D *v3d,
37 const RegionView3D *rv3d,
39};
40
42 float scale = 1.0f;
43 int frame_number = 1;
44 int resolution = 10;
45 bool use_scene_unit = false;
46 bool recenter_bounds = false;
47};
48
56
58 /* Object to be exported. */
59 enum class SelectMode {
60 Active = 0,
61 Selected = 1,
62 Visible = 2,
63 };
64
66 enum class FrameMode {
67 Active = 0,
68 Selected = 1,
69 Scene = 2,
70 };
71
72 Object *object = nullptr;
77 /* Clip drawings to camera size when exporting in camera view. */
78 bool use_clip_camera = false;
79 /* Enforce uniform stroke width by averaging radius. */
80 bool use_uniform_width = false;
81 /* Distance for resampling outline curves before export, disabled if zero. */
83};
84
85bool import_svg(const IOContext &context, const ImportParams &params, StringRefNull filepath);
86ExportStatus export_svg(const IOContext &context,
87 const ExportParams &params,
88 Scene &scene,
89 StringRefNull filepath);
90bool export_pdf(const IOContext &context,
91 const ExportParams &params,
92 Scene &scene,
93 StringRefNull filepath);
94
95} // namespace io::grease_pencil
96
97} // namespace blender
bool import_svg(const IOContext &context, const ImportParams &params, StringRefNull filepath)
ExportStatus export_svg(const IOContext &context, const ExportParams &params, Scene &scene, StringRefNull filepath)
bool export_pdf(const IOContext &context, const ExportParams &params, Scene &scene, StringRefNull filepath)
BMesh Iterators.
signed char int8_t
Definition BKE_text.h:76
IOContext(bContext &C, const ARegion *region, const View3D *v3d, const RegionView3D *rv3d, ReportList *reports)