Blender
V2.93
source
blender
io
gpencil
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
{
35
bContext
*
C
;
36
ARegion
*
region
;
37
View3D
*
v3d
;
39
Object
*
ob
;
41
uint16_t
mode
;
42
int32_t
frame_start
;
43
int32_t
frame_end
;
44
int32_t
frame_cur
;
45
uint32_t
flag
;
46
float
scale
;
48
uint16_t
select_mode
;
50
uint16_t
frame_mode
;
52
float
stroke_sample
;
53
int32_t
resolution
;
54
}
GpencilIOParams
;
55
56
/* GpencilIOParams->flag. */
57
typedef
enum
eGpencilIOParams_Flag
{
58
/* Export Filled strokes. */
59
GP_EXPORT_FILL
= (1 << 0),
60
/* Export normalized thickness. */
61
GP_EXPORT_NORM_THICKNESS
= (1 << 1),
62
/* Clip camera area. */
63
GP_EXPORT_CLIP_CAMERA
= (1 << 2),
64
}
eGpencilIOParams_Flag
;
65
66
typedef
enum
eGpencilIO_Modes
{
67
GP_EXPORT_TO_SVG
= 0,
68
GP_EXPORT_TO_PDF
= 1,
69
70
GP_IMPORT_FROM_SVG
= 2,
71
/* Add new formats here. */
72
}
eGpencilIO_Modes
;
73
74
/* Object to be exported. */
75
typedef
enum
eGpencilExportSelect
{
76
GP_EXPORT_ACTIVE
= 0,
77
GP_EXPORT_SELECTED
= 1,
78
GP_EXPORT_VISIBLE
= 2,
79
}
eGpencilExportSelect
;
80
82
typedef
enum
eGpencilExportFrame
{
83
GP_EXPORT_FRAME_ACTIVE
= 0,
84
GP_EXPORT_FRAME_SELECTED
= 1,
85
}
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
gpencil_io_import
bool gpencil_io_import(const char *filename, struct GpencilIOParams *iparams)
Definition:
gpencil_io_capi.cc:172
eGpencilExportSelect
eGpencilExportSelect
Definition:
gpencil_io.h:75
GP_EXPORT_SELECTED
@ GP_EXPORT_SELECTED
Definition:
gpencil_io.h:77
GP_EXPORT_ACTIVE
@ GP_EXPORT_ACTIVE
Definition:
gpencil_io.h:76
GP_EXPORT_VISIBLE
@ GP_EXPORT_VISIBLE
Definition:
gpencil_io.h:78
gpencil_io_export
bool gpencil_io_export(const char *filename, struct GpencilIOParams *iparams)
Definition:
gpencil_io_capi.cc:180
GpencilIOParams
struct GpencilIOParams GpencilIOParams
eGpencilExportFrame
eGpencilExportFrame
Definition:
gpencil_io.h:82
GP_EXPORT_FRAME_SELECTED
@ GP_EXPORT_FRAME_SELECTED
Definition:
gpencil_io.h:84
GP_EXPORT_FRAME_ACTIVE
@ GP_EXPORT_FRAME_ACTIVE
Definition:
gpencil_io.h:83
eGpencilIO_Modes
eGpencilIO_Modes
Definition:
gpencil_io.h:66
GP_EXPORT_TO_SVG
@ GP_EXPORT_TO_SVG
Definition:
gpencil_io.h:67
GP_IMPORT_FROM_SVG
@ GP_IMPORT_FROM_SVG
Definition:
gpencil_io.h:70
GP_EXPORT_TO_PDF
@ GP_EXPORT_TO_PDF
Definition:
gpencil_io.h:68
eGpencilIOParams_Flag
eGpencilIOParams_Flag
Definition:
gpencil_io.h:57
GP_EXPORT_NORM_THICKNESS
@ GP_EXPORT_NORM_THICKNESS
Definition:
gpencil_io.h:61
GP_EXPORT_CLIP_CAMERA
@ GP_EXPORT_CLIP_CAMERA
Definition:
gpencil_io.h:63
GP_EXPORT_FILL
@ GP_EXPORT_FILL
Definition:
gpencil_io.h:59
uint16_t
unsigned short uint16_t
Definition:
stdint.h:82
uint32_t
unsigned int uint32_t
Definition:
stdint.h:83
int32_t
signed int int32_t
Definition:
stdint.h:80
ARegion
Definition:
DNA_screen_types.h:439
GpencilIOParams
Definition:
gpencil_io.h:34
GpencilIOParams::frame_mode
uint16_t frame_mode
Definition:
gpencil_io.h:50
GpencilIOParams::frame_cur
int32_t frame_cur
Definition:
gpencil_io.h:44
GpencilIOParams::select_mode
uint16_t select_mode
Definition:
gpencil_io.h:48
GpencilIOParams::resolution
int32_t resolution
Definition:
gpencil_io.h:53
GpencilIOParams::scale
float scale
Definition:
gpencil_io.h:46
GpencilIOParams::stroke_sample
float stroke_sample
Definition:
gpencil_io.h:52
GpencilIOParams::flag
uint32_t flag
Definition:
gpencil_io.h:45
GpencilIOParams::frame_end
int32_t frame_end
Definition:
gpencil_io.h:43
GpencilIOParams::frame_start
int32_t frame_start
Definition:
gpencil_io.h:42
GpencilIOParams::C
bContext * C
Definition:
gpencil_io.h:35
GpencilIOParams::mode
uint16_t mode
Definition:
gpencil_io.h:41
GpencilIOParams::v3d
View3D * v3d
Definition:
gpencil_io.h:37
GpencilIOParams::region
ARegion * region
Definition:
gpencil_io.h:36
GpencilIOParams::ob
Object * ob
Definition:
gpencil_io.h:39
Object
Definition:
DNA_object_types.h:239
View3D
Definition:
DNA_view3d_types.h:264
bContext
Definition:
context.c:69
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1