Blender  V2.93
ED_mask.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) 2012 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #include "DNA_mask_types.h"
31 
32 struct Depsgraph;
33 struct KeyframeEditData;
34 struct MaskLayer;
35 struct MaskLayerShape;
36 struct bContext;
37 struct wmKeyConfig;
38 
39 /* mask_edit.c */
40 void ED_mask_deselect_all(const struct bContext *C);
41 
42 void ED_operatortypes_mask(void);
43 void ED_keymap_mask(struct wmKeyConfig *keyconf);
44 void ED_operatormacros_mask(void);
45 
46 /* mask_query.c */
47 void ED_mask_get_size(struct ScrArea *area, int *width, int *height);
48 void ED_mask_zoom(struct ScrArea *area, struct ARegion *region, float *zoomx, float *zoomy);
49 void ED_mask_get_aspect(struct ScrArea *area, struct ARegion *region, float *aspx, float *aspy);
50 
52  struct ARegion *region,
53  float *scalex,
54  float *scaley);
55 void ED_mask_mouse_pos(struct ScrArea *area,
56  struct ARegion *region,
57  const int mval[2],
58  float co[2]);
59 
61  struct ScrArea *area, struct ARegion *region, float x, float y, float *xr, float *yr);
63  struct ScrArea *area, struct ARegion *region, float x, float y, float *xr, float *yr);
64 
65 void ED_mask_cursor_location_get(struct ScrArea *area, float cursor[2]);
66 bool ED_mask_selected_minmax(const struct bContext *C,
67  float min[2],
68  float max[2],
69  bool handles_as_control_point);
70 
71 /* mask_draw.c */
72 void ED_mask_draw(const struct bContext *C, const char draw_flag, const char draw_type);
74  struct Mask *mask,
75  struct ARegion *region,
76  const char draw_flag,
77  const char draw_type,
78  const eMaskOverlayMode overlay_mode,
79  const int width_i,
80  const int height_i,
81  const float aspx,
82  const float aspy,
83  const bool do_scale_applied,
84  const bool do_draw_cb,
85  float stabmat[4][4],
86  const struct bContext *C);
87 
89  struct Mask *mask, struct ARegion *region, const int cfra, const int sfra, const int efra);
90 
91 /* mask_shapekey.c */
92 void ED_mask_layer_shape_auto_key(struct MaskLayer *mask_layer, const int frame);
93 bool ED_mask_layer_shape_auto_key_all(struct Mask *mask, const int frame);
94 bool ED_mask_layer_shape_auto_key_select(struct Mask *mask, const int frame);
95 
96 /* ----------- Mask AnimEdit API ------------------ */
97 bool ED_masklayer_frames_looper(struct MaskLayer *mask_layer,
98  struct Scene *scene,
99  bool (*mask_layer_shape_cb)(struct MaskLayerShape *,
100  struct Scene *));
101 void ED_masklayer_make_cfra_list(struct MaskLayer *mask_layer, ListBase *elems, bool onlysel);
102 
103 bool ED_masklayer_frame_select_check(struct MaskLayer *mask_layer);
104 void ED_masklayer_frame_select_set(struct MaskLayer *mask_layer, short mode);
105 void ED_masklayer_frames_select_box(struct MaskLayer *mask_layer,
106  float min,
107  float max,
108  short select_mode);
110  struct MaskLayer *mask_layer,
111  short tool,
112  short select_mode);
113 void ED_mask_select_frames(struct MaskLayer *mask_layer, short select_mode);
114 void ED_mask_select_frame(struct MaskLayer *mask_layer, int selx, short select_mode);
115 
116 bool ED_masklayer_frames_delete(struct MaskLayer *mask_layer);
117 void ED_masklayer_frames_duplicate(struct MaskLayer *mask_layer);
118 
119 void ED_masklayer_snap_frames(struct MaskLayer *mask_layer, struct Scene *scene, short mode);
120 
121 #if 0
122 void free_gpcopybuf(void);
123 void copy_gpdata(void);
124 void paste_gpdata(void);
125 
126 void mirror_masklayer_frames(struct MaskLayer *mask_layer, short mode);
127 #endif
128 
129 #ifdef __cplusplus
130 }
131 #endif
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
eMaskOverlayMode
void ED_mask_deselect_all(const struct bContext *C)
void ED_masklayer_frame_select_set(struct MaskLayer *mask_layer, short mode)
void ED_mask_layer_shape_auto_key(struct MaskLayer *mask_layer, const int frame)
void ED_mask_get_aspect(struct ScrArea *area, struct ARegion *region, float *aspx, float *aspy)
void ED_masklayer_frames_duplicate(struct MaskLayer *mask_layer)
void ED_operatormacros_mask(void)
Definition: mask_edit.c:153
void ED_mask_zoom(struct ScrArea *area, struct ARegion *region, float *zoomx, float *zoomy)
Definition: mask_query.c:726
void ED_mask_select_frames(struct MaskLayer *mask_layer, short select_mode)
bool ED_masklayer_frames_delete(struct MaskLayer *mask_layer)
void ED_masklayer_frames_select_region(struct KeyframeEditData *ked, struct MaskLayer *mask_layer, short tool, short select_mode)
void ED_mask_point_pos__reverse(struct ScrArea *area, struct ARegion *region, float x, float y, float *xr, float *yr)
Definition: mask_query.c:565
bool ED_mask_layer_shape_auto_key_select(struct Mask *mask, const int frame)
void ED_mask_mouse_pos(struct ScrArea *area, struct ARegion *region, const int mval[2], float co[2])
Definition: mask_query.c:493
void ED_masklayer_snap_frames(struct MaskLayer *mask_layer, struct Scene *scene, short mode)
bool ED_masklayer_frames_looper(struct MaskLayer *mask_layer, struct Scene *scene, bool(*mask_layer_shape_cb)(struct MaskLayerShape *, struct Scene *))
void ED_masklayer_frames_select_box(struct MaskLayer *mask_layer, float min, float max, short select_mode)
void ED_mask_pixelspace_factor(struct ScrArea *area, struct ARegion *region, float *scalex, float *scaley)
Definition: mask_query.c:788
bool ED_mask_selected_minmax(const struct bContext *C, float min[2], float max[2], bool handles_as_control_point)
void ED_masklayer_make_cfra_list(struct MaskLayer *mask_layer, ListBase *elems, bool onlysel)
void ED_mask_cursor_location_get(struct ScrArea *area, float cursor[2])
Definition: mask_query.c:831
void ED_keymap_mask(struct wmKeyConfig *keyconf)
Definition: mask_edit.c:147
void ED_mask_select_frame(struct MaskLayer *mask_layer, int selx, short select_mode)
bool ED_masklayer_frame_select_check(struct MaskLayer *mask_layer)
void ED_mask_point_pos(struct ScrArea *area, struct ARegion *region, float x, float y, float *xr, float *yr)
Definition: mask_query.c:528
void ED_mask_draw_region(struct Depsgraph *depsgraph, struct Mask *mask, struct ARegion *region, const char draw_flag, const char draw_type, const eMaskOverlayMode overlay_mode, const int width_i, const int height_i, const float aspx, const float aspy, const bool do_scale_applied, const bool do_draw_cb, float stabmat[4][4], const struct bContext *C)
void ED_mask_draw_frames(struct Mask *mask, struct ARegion *region, const int cfra, const int sfra, const int efra)
Definition: mask_draw.c:788
void ED_operatortypes_mask(void)
Definition: mask_edit.c:83
void ED_mask_get_size(struct ScrArea *area, int *width, int *height)
Definition: mask_query.c:691
bool ED_mask_layer_shape_auto_key_all(struct Mask *mask, const int frame)
void ED_mask_draw(const struct bContext *C, const char draw_flag, const char draw_type)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define C
Definition: RandGen.cpp:39
Scene scene
const Depsgraph * depsgraph
static void area(int d1, int d2, int e1, int e2, float weights[2])
#define min(a, b)
Definition: sort.c:51
float max
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)