Blender V5.0
ED_gpencil_legacy.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2008 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11struct ID;
12struct ListBase;
13struct PointerRNA;
14
15struct Brush;
17struct bGPDframe;
18struct bGPDlayer;
19struct bGPDspoint;
20struct bGPDstroke;
21struct bGPdata;
22struct tGPspoint;
23
24struct ARegion;
25struct Depsgraph;
26struct Main;
27struct RegionView3D;
28struct ReportList;
29struct Scene;
30struct ScrArea;
31struct SnapObjectContext;
32struct ToolSettings;
33struct View3D;
34struct bContext;
35
36struct Material;
37struct Object;
38
39struct KeyframeEditData;
40struct bAnimContext;
41
42struct wmKeyConfig;
43struct wmOperator;
44
45/* ------------- Grease-Pencil Runtime Data ---------------- */
46
52struct tGPspoint {
54 float m_xy[2];
56 float pressure;
58 float strength;
60 float time;
62 float uv_fac;
64 float uv_rot;
66 float rnd[3];
70 float vert_color[4];
71};
72
73/* ----------- Grease Pencil Tools/Context ------------- */
74
75/* Context-dependent */
76
94 ScrArea *area,
95 Scene *scene,
96 PointerRNA *r_ptr);
101
106bool ED_gpencil_stroke_can_use_direct(const ScrArea *area, const bGPDstroke *gps);
107
108/* ----------- Grease Pencil Operators ----------------- */
109
111
113
114/* ------------ Grease-Pencil Drawing API ------------------ */
115/* `drawgpencil.cc` */
116
128void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d);
135 Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, bool only3d);
137 Scene *scene, bGPdata *gpd, int winx, int winy, int cfra, char spacetype);
138
139/* ----------- Grease-Pencil AnimEdit API ------------------ */
144 Scene *scene,
145 bool (*gpf_cb)(bGPDframe *, Scene *));
149void ED_gpencil_layer_make_cfra_list(bGPDlayer *gpl, ListBase *elems, bool onlysel);
150
158void ED_gpencil_layer_frame_select_set(bGPDlayer *gpl, short mode);
162void ED_gpencil_layer_frames_select_box(bGPDlayer *gpl, float min, float max, short select_mode);
167 bGPDlayer *gpl,
168 short tool,
169 short select_mode);
173void ED_gpencil_select_frames(bGPDlayer *gpl, short select_mode);
177void ED_gpencil_select_frame(bGPDlayer *gpl, int selx, short select_mode);
178
183
192
202void ED_gpencil_layer_snap_frames(bGPDlayer *gpl, Scene *scene, short mode);
203
208void ED_gpencil_layer_mirror_frames(bGPDlayer *gpl, Scene *scene, short mode);
209
224bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, short offset_mode);
225
226/* ----------- Add Primitive Utilities -------------- */
227
228/* texture coordinate utilities */
229
235 int *buffer_size,
236 int *buffer_used,
237 bool clear);
bool ED_gpencil_stroke_can_use_direct(const ScrArea *area, const bGPDstroke *gps)
void ED_gpencil_layer_frame_select_set(bGPDlayer *gpl, short mode)
void ED_gpencil_layer_frames_keytype_set(bGPDlayer *gpl, short type)
void ED_gpencil_layer_frames_duplicate(bGPDlayer *gpl)
bGPdata * ED_annotation_data_get_active(const bContext *C)
void ED_gpencil_set_active_channel(bGPdata *gpd, bGPDlayer *gpl)
bool ED_gpencil_layer_frames_delete(bGPDlayer *gpl)
void ED_gpencil_select_frames(bGPDlayer *gpl, short select_mode)
bool ED_gpencil_layer_frame_select_check(const bGPDlayer *gpl)
void ED_gpencil_layer_mirror_frames(bGPDlayer *gpl, Scene *scene, short mode)
void ED_annotation_draw_2dimage(const bContext *C)
void ED_gpencil_select_frame(bGPDlayer *gpl, int selx, short select_mode)
bGPdata * ED_annotation_data_get_active_direct(ID *screen_id, ScrArea *area, Scene *scene)
bGPdata ** ED_annotation_data_get_pointers_direct(ID *screen_id, ScrArea *area, Scene *scene, PointerRNA *r_ptr)
void ED_annotation_draw_view3d(Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, bool only3d)
bool ED_gpencil_layer_frames_looper(bGPDlayer *gpl, Scene *scene, bool(*gpf_cb)(bGPDframe *, Scene *))
void ED_gpencil_layer_frames_select_region(KeyframeEditData *ked, bGPDlayer *gpl, short tool, short select_mode)
void ED_keymap_gpencil_legacy(wmKeyConfig *keyconf)
bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, short offset_mode)
void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
void ED_gpencil_layer_frames_select_box(bGPDlayer *gpl, float min, float max, short select_mode)
void ED_operatortypes_gpencil_legacy()
void ED_gpencil_layer_make_cfra_list(bGPDlayer *gpl, ListBase *elems, bool onlysel)
tGPspoint * ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array, int *buffer_size, int *buffer_used, bool clear)
void ED_gpencil_layer_snap_frames(bGPDlayer *gpl, Scene *scene, short mode)
void ED_gpencil_anim_copybuf_free()
void ED_annotation_draw_ex(Scene *scene, bGPdata *gpd, int winx, int winy, int cfra, char spacetype)
bool ED_gpencil_anim_copybuf_copy(bAnimContext *ac)
bGPdata ** ED_annotation_data_get_pointers(const bContext *C, PointerRNA *r_ptr)
#define C
Definition RandGen.cpp:29
BPy_StructRNA * depsgraph
static void clear(Message &msg)
Definition msgfmt.cc:213
#define min(a, b)
Definition sort.cc:36
Definition DNA_ID.h:414
float vert_color[4]
max
Definition text_draw.cc:251