Blender V5.3
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
11#include "DNA_listBase.h"
12struct Depsgraph;
13struct SnapObjectContext;
14namespace blender {
15
16struct ID;
17struct PointerRNA;
18
19struct Brush;
20struct CfraElem;
22struct bGPDframe;
23struct bGPDlayer;
24struct bGPDspoint;
25struct bGPDstroke;
26struct bGPdata;
27struct tGPspoint;
28
29struct ARegion;
30struct Main;
31struct RegionView3D;
32struct ReportList;
33struct Scene;
34struct ScrArea;
35struct ToolSettings;
36struct View3D;
37struct bContext;
38
39struct Material;
40struct Object;
41
42struct KeyframeEditData;
43struct bAnimContext;
44
45struct wmKeyConfig;
46struct wmOperator;
47
48/* ------------- Grease-Pencil Runtime Data ---------------- */
49
55struct tGPspoint {
57 float m_xy[2];
59 float pressure;
61 float strength;
63 float time;
65 float uv_fac;
67 float uv_rot;
69 float rnd[3];
73 float vert_color[4];
74};
75
76/* ----------- Grease Pencil Tools/Context ------------- */
77
78/* Context-dependent */
79
97 ScrArea *area,
98 Scene *scene,
99 PointerRNA *r_ptr);
104
109bool ED_gpencil_stroke_can_use_direct(const ScrArea *area, const bGPDstroke *gps);
110
111/* ----------- Grease Pencil Operators ----------------- */
112
114
116
117/* ------------ Grease-Pencil Drawing API ------------------ */
118/* `drawgpencil.cc` */
119
131void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d);
138 Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, bool only3d);
140 Scene *scene, bGPdata *gpd, int winx, int winy, int cfra, char spacetype);
141
142/* ----------- Grease-Pencil AnimEdit API ------------------ */
147 Scene *scene,
148 bool (*gpf_cb)(bGPDframe *, Scene *));
152void ED_gpencil_layer_make_cfra_list(bGPDlayer *gpl, ListBaseT<CfraElem> *elems, bool onlysel);
153
161void ED_gpencil_layer_frame_select_set(bGPDlayer *gpl, short mode);
165void ED_gpencil_layer_frames_select_box(bGPDlayer *gpl, float min, float max, short select_mode);
170 bGPDlayer *gpl,
171 short tool,
172 short select_mode);
176void ED_gpencil_select_frames(bGPDlayer *gpl, short select_mode);
180void ED_gpencil_select_frame(bGPDlayer *gpl, int selx, short select_mode);
181
186
195
205void ED_gpencil_layer_snap_frames(bGPDlayer *gpl, Scene *scene, short mode);
206
211void ED_gpencil_layer_mirror_frames(bGPDlayer *gpl, Scene *scene, short mode);
212
227bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, short offset_mode);
228
229/* ----------- Add Primitive Utilities -------------- */
230
231/* texture coordinate utilities */
232
238 int *buffer_size,
239 int *buffer_used,
240 bool clear);
241
242} // namespace blender
These structs are the foundation for all linked lists in the library system.
#define C
Definition RandGen.cpp:29
btScalar max
BMesh Iterators.
void ED_annotation_draw_2dimage(const bContext *C)
void ED_gpencil_layer_frames_select_region(KeyframeEditData *ked, bGPDlayer *gpl, short tool, short select_mode)
bGPdata ** ED_annotation_data_get_pointers(const bContext *C, PointerRNA *r_ptr)
void ED_annotation_draw_view3d(Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *region, bool only3d)
void ED_gpencil_layer_mirror_frames(bGPDlayer *gpl, Scene *scene, short mode)
bool ED_gpencil_stroke_can_use_direct(const ScrArea *area, const bGPDstroke *gps)
void ED_gpencil_layer_frame_select_set(bGPDlayer *gpl, short mode)
bool ED_gpencil_anim_copybuf_copy(bAnimContext *ac)
void ED_keymap_gpencil_legacy(wmKeyConfig *keyconf)
void ED_gpencil_layer_frames_select_box(bGPDlayer *gpl, float min, float max, short select_mode)
void ED_gpencil_select_frame(bGPDlayer *gpl, int selx, short select_mode)
bool ED_gpencil_layer_frame_select_check(const bGPDlayer *gpl)
void ED_gpencil_layer_frames_keytype_set(bGPDlayer *gpl, short type)
void ED_operatortypes_gpencil_legacy()
bool ED_gpencil_anim_copybuf_paste(bAnimContext *ac, const short offset_mode)
bGPdata * ED_annotation_data_get_active_direct(ID *screen_id, ScrArea *area, Scene *scene)
bool ED_gpencil_layer_frames_delete(bGPDlayer *gpl)
bGPdata * ED_annotation_data_get_active(const bContext *C)
bGPdata ** ED_annotation_data_get_pointers_direct(ID *screen_id, ScrArea *area, Scene *scene, PointerRNA *r_ptr)
void ED_gpencil_layer_frames_duplicate(bGPDlayer *gpl)
void ED_gpencil_layer_make_cfra_list(bGPDlayer *gpl, ListBaseT< CfraElem > *elems, bool onlysel)
void ED_gpencil_layer_snap_frames(bGPDlayer *gpl, Scene *scene, short mode)
tGPspoint * ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array, int *buffer_size, int *buffer_used, const bool clear)
void ED_gpencil_anim_copybuf_free()
void ED_annotation_draw_ex(Scene *scene, bGPdata *gpd, int winx, int winy, const int cfra, const char spacetype)
void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
void ED_gpencil_select_frames(bGPDlayer *gpl, short select_mode)
void ED_gpencil_set_active_channel(bGPdata *gpd, bGPDlayer *gpl)
bool ED_gpencil_layer_frames_looper(bGPDlayer *gpl, Scene *scene, bool(*gpf_cb)(bGPDframe *, Scene *))
#define min(a, b)
Definition sort.cc:38