Blender  V2.93
gpencil_io.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2020 Blender Foundation
17  * All rights reserved.
18  */
19 #pragma once
20 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 struct ARegion;
30 struct bContext;
31 struct Object;
32 struct View3D;
33 
34 typedef struct GpencilIOParams {
46  float scale;
55 
56 /* GpencilIOParams->flag. */
57 typedef enum eGpencilIOParams_Flag {
58  /* Export Filled strokes. */
59  GP_EXPORT_FILL = (1 << 0),
60  /* Export normalized thickness. */
62  /* Clip camera area. */
65 
66 typedef enum eGpencilIO_Modes {
69 
71  /* Add new formats here. */
73 
74 /* Object to be exported. */
75 typedef enum eGpencilExportSelect {
80 
82 typedef enum eGpencilExportFrame {
86 
87 bool gpencil_io_export(const char *filename, struct GpencilIOParams *iparams);
88 bool gpencil_io_import(const char *filename, struct GpencilIOParams *iparams);
89 
90 #ifdef __cplusplus
91 }
92 #endif
bool gpencil_io_import(const char *filename, struct GpencilIOParams *iparams)
eGpencilExportSelect
Definition: gpencil_io.h:75
@ GP_EXPORT_SELECTED
Definition: gpencil_io.h:77
@ GP_EXPORT_ACTIVE
Definition: gpencil_io.h:76
@ GP_EXPORT_VISIBLE
Definition: gpencil_io.h:78
bool gpencil_io_export(const char *filename, struct GpencilIOParams *iparams)
struct GpencilIOParams GpencilIOParams
eGpencilExportFrame
Definition: gpencil_io.h:82
@ GP_EXPORT_FRAME_SELECTED
Definition: gpencil_io.h:84
@ GP_EXPORT_FRAME_ACTIVE
Definition: gpencil_io.h:83
eGpencilIO_Modes
Definition: gpencil_io.h:66
@ GP_EXPORT_TO_SVG
Definition: gpencil_io.h:67
@ GP_IMPORT_FROM_SVG
Definition: gpencil_io.h:70
@ GP_EXPORT_TO_PDF
Definition: gpencil_io.h:68
eGpencilIOParams_Flag
Definition: gpencil_io.h:57
@ GP_EXPORT_NORM_THICKNESS
Definition: gpencil_io.h:61
@ GP_EXPORT_CLIP_CAMERA
Definition: gpencil_io.h:63
@ GP_EXPORT_FILL
Definition: gpencil_io.h:59
unsigned short uint16_t
Definition: stdint.h:82
unsigned int uint32_t
Definition: stdint.h:83
signed int int32_t
Definition: stdint.h:80
uint16_t frame_mode
Definition: gpencil_io.h:50
int32_t frame_cur
Definition: gpencil_io.h:44
uint16_t select_mode
Definition: gpencil_io.h:48
int32_t resolution
Definition: gpencil_io.h:53
float stroke_sample
Definition: gpencil_io.h:52
uint32_t flag
Definition: gpencil_io.h:45
int32_t frame_end
Definition: gpencil_io.h:43
int32_t frame_start
Definition: gpencil_io.h:42
bContext * C
Definition: gpencil_io.h:35
uint16_t mode
Definition: gpencil_io.h:41
View3D * v3d
Definition: gpencil_io.h:37
ARegion * region
Definition: gpencil_io.h:36
Object * ob
Definition: gpencil_io.h:39