Blender
V3.3
source
blender
io
gpencil
gpencil_io.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later
2
* Copyright 2020 Blender Foundation. All rights reserved. */
3
#pragma once
4
9
#ifdef __cplusplus
10
extern
"C"
{
11
#endif
12
13
struct
ARegion
;
14
struct
Object
;
15
struct
View3D
;
16
struct
bContext
;
17
18
typedef
struct
GpencilIOParams
{
19
bContext
*
C
;
20
ARegion
*
region
;
21
View3D
*
v3d
;
23
Object
*
ob
;
25
uint16_t
mode
;
26
int32_t
frame_start
;
27
int32_t
frame_end
;
28
int32_t
frame_cur
;
29
uint32_t
flag
;
30
float
scale
;
32
uint16_t
select_mode
;
34
uint16_t
frame_mode
;
36
float
stroke_sample
;
37
int32_t
resolution
;
39
char
filename
[128];
40
}
GpencilIOParams
;
41
42
/* GpencilIOParams->flag. */
43
typedef
enum
eGpencilIOParams_Flag
{
44
/* Export Filled strokes. */
45
GP_EXPORT_FILL
= (1 << 0),
46
/* Export normalized thickness. */
47
GP_EXPORT_NORM_THICKNESS
= (1 << 1),
48
/* Clip camera area. */
49
GP_EXPORT_CLIP_CAMERA
= (1 << 2),
50
}
eGpencilIOParams_Flag
;
51
52
typedef
enum
eGpencilIO_Modes
{
53
GP_EXPORT_TO_SVG
= 0,
54
GP_EXPORT_TO_PDF
= 1,
55
56
GP_IMPORT_FROM_SVG
= 2,
57
/* Add new formats here. */
58
}
eGpencilIO_Modes
;
59
60
/* Object to be exported. */
61
typedef
enum
eGpencilExportSelect
{
62
GP_EXPORT_ACTIVE
= 0,
63
GP_EXPORT_SELECTED
= 1,
64
GP_EXPORT_VISIBLE
= 2,
65
}
eGpencilExportSelect
;
66
68
typedef
enum
eGpencilExportFrame
{
69
GP_EXPORT_FRAME_ACTIVE
= 0,
70
GP_EXPORT_FRAME_SELECTED
= 1,
71
GP_EXPORT_FRAME_SCENE
= 2,
72
}
eGpencilExportFrame
;
73
77
bool
gpencil_io_export
(
const
char
*filepath,
struct
GpencilIOParams
*iparams);
81
bool
gpencil_io_import
(
const
char
*filepath,
struct
GpencilIOParams
*iparams);
82
83
#ifdef __cplusplus
84
}
85
#endif
eGpencilExportSelect
eGpencilExportSelect
Definition:
gpencil_io.h:61
GP_EXPORT_SELECTED
@ GP_EXPORT_SELECTED
Definition:
gpencil_io.h:63
GP_EXPORT_ACTIVE
@ GP_EXPORT_ACTIVE
Definition:
gpencil_io.h:62
GP_EXPORT_VISIBLE
@ GP_EXPORT_VISIBLE
Definition:
gpencil_io.h:64
gpencil_io_import
bool gpencil_io_import(const char *filepath, struct GpencilIOParams *iparams)
Definition:
gpencil_io_capi.cc:164
GpencilIOParams
struct GpencilIOParams GpencilIOParams
eGpencilExportFrame
eGpencilExportFrame
Definition:
gpencil_io.h:68
GP_EXPORT_FRAME_SELECTED
@ GP_EXPORT_FRAME_SELECTED
Definition:
gpencil_io.h:70
GP_EXPORT_FRAME_ACTIVE
@ GP_EXPORT_FRAME_ACTIVE
Definition:
gpencil_io.h:69
GP_EXPORT_FRAME_SCENE
@ GP_EXPORT_FRAME_SCENE
Definition:
gpencil_io.h:71
eGpencilIO_Modes
eGpencilIO_Modes
Definition:
gpencil_io.h:52
GP_EXPORT_TO_SVG
@ GP_EXPORT_TO_SVG
Definition:
gpencil_io.h:53
GP_IMPORT_FROM_SVG
@ GP_IMPORT_FROM_SVG
Definition:
gpencil_io.h:56
GP_EXPORT_TO_PDF
@ GP_EXPORT_TO_PDF
Definition:
gpencil_io.h:54
gpencil_io_export
bool gpencil_io_export(const char *filepath, struct GpencilIOParams *iparams)
Definition:
gpencil_io_capi.cc:171
eGpencilIOParams_Flag
eGpencilIOParams_Flag
Definition:
gpencil_io.h:43
GP_EXPORT_NORM_THICKNESS
@ GP_EXPORT_NORM_THICKNESS
Definition:
gpencil_io.h:47
GP_EXPORT_CLIP_CAMERA
@ GP_EXPORT_CLIP_CAMERA
Definition:
gpencil_io.h:49
GP_EXPORT_FILL
@ GP_EXPORT_FILL
Definition:
gpencil_io.h:45
uint16_t
unsigned short uint16_t
Definition:
stdint.h:79
uint32_t
unsigned int uint32_t
Definition:
stdint.h:80
int32_t
signed int int32_t
Definition:
stdint.h:77
ARegion
Definition:
DNA_screen_types.h:447
GpencilIOParams
Definition:
gpencil_io.h:18
GpencilIOParams::frame_mode
uint16_t frame_mode
Definition:
gpencil_io.h:34
GpencilIOParams::frame_cur
int32_t frame_cur
Definition:
gpencil_io.h:28
GpencilIOParams::filename
char filename[128]
Definition:
gpencil_io.h:39
GpencilIOParams::select_mode
uint16_t select_mode
Definition:
gpencil_io.h:32
GpencilIOParams::resolution
int32_t resolution
Definition:
gpencil_io.h:37
GpencilIOParams::scale
float scale
Definition:
gpencil_io.h:30
GpencilIOParams::stroke_sample
float stroke_sample
Definition:
gpencil_io.h:36
GpencilIOParams::flag
uint32_t flag
Definition:
gpencil_io.h:29
GpencilIOParams::frame_end
int32_t frame_end
Definition:
gpencil_io.h:27
GpencilIOParams::frame_start
int32_t frame_start
Definition:
gpencil_io.h:26
GpencilIOParams::C
bContext * C
Definition:
gpencil_io.h:19
GpencilIOParams::mode
uint16_t mode
Definition:
gpencil_io.h:25
GpencilIOParams::v3d
View3D * v3d
Definition:
gpencil_io.h:21
GpencilIOParams::region
ARegion * region
Definition:
gpencil_io.h:20
GpencilIOParams::ob
Object * ob
Definition:
gpencil_io.h:23
Object
Definition:
DNA_object_types.h:242
View3D
Definition:
DNA_view3d_types.h:256
bContext
Definition:
context.c:56
Generated on Sat Jul 27 2024 14:57:55 for Blender by
doxygen
1.9.1