66 switch (
area->spacetype) {
100 if (mask_layer ==
NULL) {
149 mask->masklay_act =
mask->masklay_tot - 1;
160 ot->
name =
"Add Mask Layer";
195 ot->
name =
"Remove Mask Layer";
197 ot->
idname =
"MASK_OT_layer_remove";
269 const float threshold = 19.0f;
272 float closest_dist_squared = 0.0f;
275 bool undistort =
false;
276 *r_mask_layer =
NULL;
277 *r_mask_spline =
NULL;
285 pixel_co[0] = co[0] *
width;
286 pixel_co[1] = co[1] *
height;
293 mask_layer_orig !=
NULL;
294 mask_layer_orig = mask_layer_orig->next, mask_layer_eval = mask_layer_eval->next) {
298 for (
MaskSpline *spline_orig = mask_layer_orig->splines.first,
299 *spline_eval = mask_layer_eval->splines.first;
301 spline_orig = spline_orig->next, spline_eval = spline_eval->next) {
302 if ((spline_orig->flag &
SELECT) == 0) {
308 for (
int i = 0; i < spline_orig->tot_point; i++) {
327 if (dist_squared <= max_bb_side * max_bb_side * 0.5f &&
328 (closest_spline ==
NULL || dist_squared < closest_dist_squared)) {
329 closest_layer = mask_layer_orig;
330 closest_spline = spline_orig;
331 closest_dist_squared = dist_squared;
335 if (closest_dist_squared <
square_f(threshold) && closest_spline !=
NULL) {
350 if (
square_f(diff_score) < closest_dist_squared) {
355 *r_mask_layer = closest_layer;
356 *r_mask_spline = closest_spline;
364 for (
int i = 0; i < spline->
tot_point; i++) {
383 switch (which_handle) {
398 BLI_assert(!
"Unexpected situation in select_sliding_point()");
437 MaskLayer *mask_layer, *cv_mask_layer, *feather_mask_layer;
438 MaskSpline *spline, *cv_spline, *feather_spline;
443 float co[2], cv_score, feather_score;
444 const float threshold = 19;
454 C,
mask, co, threshold, &cv_mask_layer, &cv_spline, &which_handle, &cv_score);
465 if (slide_feather || !cv_point || feather_score < cv_score) {
468 mask_layer = feather_mask_layer;
469 spline = feather_spline;
470 point = feather_point;
482 mask_layer = cv_mask_layer;
499 customdata->
spline = spline;
500 customdata->
point = point;
503 customdata->
action = action;
592 for (
int i = 0; i <
data->spline->tot_point; i++) {
605 for (
int i = 0; i <
data->spline->tot_point; i++) {
611 for (
int j = 0; j < point->
tot_uw; j++) {
612 point->
uw[j] = orig_point->
uw[j];
621 if (
data->orig_spline) {
630 data->point->bezt.weight =
data->weight;
635 data->point->bezt.h1 =
data->old_h1;
636 data->point->bezt.h2 =
data->old_h2;
643 if (
data->orig_spline) {
656 switch (event->
type) {
697 if (
data->is_accurate) {
706 &
data->spline->points[0],
707 &
data->spline->points[
data->spline->tot_point - 1])) {
708 SWAP(
float, delta[0], delta[1]);
712 if (
data->point != &
data->spline->points[0]) {
723 data->is_curvature_only,
724 data->orig_handle_coord,
728 if (
data->is_sliding_new_point) {
734 sub_v2_v2v2(vec, bezt->vec[1], bezt->vec[self_handle]);
735 add_v2_v2v2(bezt->vec[other_handle], bezt->vec[1], vec);
745 float vec[2], no[2], p[2],
c[2],
w, offco[2];
746 float *weight =
NULL;
747 float weight_scalar = 1.0f;
748 bool is_overall_feather =
data->is_overall_feather ||
data->is_initial_feather;
759 float dist_pos = FLT_MAX;
760 float dist_neg = FLT_MAX;
765 if (u_pos > 0.0f && u_pos < 1.0f) {
770 if (u_neg > 0.0f && u_neg < 1.0f) {
775 u = dist_pos < dist_neg ? u_pos : u_neg;
777 if (u > 0.0f && u < 1.0f) {
781 weight = &
data->uw->w;
783 if (weight_scalar != 0.0f) {
784 weight_scalar = 1.0f / weight_scalar;
792 weight = &bezt->weight;
804 if (is_overall_feather) {
811 w_delta =
w -
data->weight *
data->weight_scalar;
817 *weight =
data->weight;
822 if (
data->is_initial_feather) {
823 *weight =
w * weight_scalar;
833 if (
data->orig_spline) {
841 if (weight_scalar != 0.0f) {
842 *weight =
w * weight_scalar;
854 for (
int i = 0; i <
data->spline->tot_point; i++) {
880 if (
data->is_sliding_new_point) {
936 "First try to slide feather instead of vertex");
939 ot->
srna,
"is_new_point", 0,
"Slide New Point",
"Newly created vertex is being slid");
979 const float threshold = 19.0f;
997 const float threshold = 19.0f;
1029 if (next_bezt ==
NULL) {
1037 slide_data->
spline = spline;
1038 slide_data->
point = point;
1112 if (slide_data !=
NULL) {
1129 const float u2 = u * u, u3 = u * u * u;
1130 const float v = 1.0f - u;
1131 const float v2 =
v *
v, v3 =
v *
v *
v;
1132 const float inv_divider = 1.0f / (3.0f *
v2 * u);
1133 const float t = 3.0f *
v *
u2;
1134 solution[0] = -(v3 * P0[0] +
t * P2[0] + u3 * P3[0] -
B[0]) * inv_divider;
1135 solution[1] = -(v3 * P0[1] +
t * P2[1] + u3 * P3[1] -
B[1]) * inv_divider;
1145 const float u2 = u * u, u3 = u * u * u;
1146 const float v = 1.0f - u;
1147 const float v2 =
v *
v, v3 =
v *
v *
v;
1148 const float inv_divider = 1.0f / (3.0f *
v *
u2);
1149 const float t = 3.0f *
v2 * u;
1150 solution[0] = -(v3 * P0[0] +
t * P1[0] + u3 * P3[0] -
B[0]) * inv_divider;
1151 solution[1] = -(v3 * P0[1] +
t * P1[1] + u3 * P3[1] -
B[1]) * inv_divider;
1157 const float margin = 0.2f;
1159 float u = slide_data->
u;
1161 switch (event->
type) {
1173 if ((u > margin && u < 0.5f) || (u >= 0.5f && u < 1.0f - margin)) {
1196 float B[2], mouse_coord[2], delta[2];
1210 bool need_restore_P2 =
false;
1214 float x = (u - margin) * 0.5f / (0.5f - margin);
1215 float weight = (3 *
x *
x - 2 *
x *
x *
x);
1222 need_restore_P2 =
true;
1225 if (weight > 0.0f) {
1235 if (need_restore_P2) {
1241 bool need_restore_P1 =
false;
1243 if (u < 1.0f - margin) {
1245 float x = ((1.0f - u) - margin) * 0.5f / (0.5f - margin);
1246 float weight = 3 *
x *
x - 2 *
x *
x *
x;
1253 need_restore_P1 =
true;
1256 if (weight > 0.0f) {
1266 if (need_restore_P1) {
1310 ot->
name =
"Slide Spline Curvature";
1311 ot->
description =
"Slide a point on the spline to define its curvature";
1312 ot->
idname =
"MASK_OT_slide_spline_curvature";
1350 ot->
name =
"Toggle Cyclic";
1352 ot->
idname =
"MASK_OT_cyclic_toggle";
1372 for (
int i = 0; i < point->
tot_uw; i++) {
1389 for (
int i = 0; i < point->
tot_uw; i++) {
1391 new_uw[j++] = point->
uw[i];
1405 bool changed =
false;
1409 int mask_layer_shape_ofs = 0;
1415 spline = mask_layer->splines.first;
1418 const int tot_point_orig = spline->
tot_point;
1423 for (
int i = 0; i < spline->
tot_point; i++) {
1436 if (spline == mask_layer->act_spline) {
1437 mask_layer->act_spline =
NULL;
1438 mask_layer->act_point =
NULL;
1448 for (
int i = 0, j = 0; i < tot_point_orig; i++) {
1452 if (point == mask_layer->act_point) {
1453 mask_layer->act_point = &new_points[j];
1458 new_points[j] = *point;
1462 if (point == mask_layer->act_point) {
1463 mask_layer->act_point =
NULL;
1473 mask_layer_shape_ofs += spline->
tot_point;
1476 spline->
points = new_points;
1482 spline = next_spline;
1507 ot->
description =
"Delete selected control points or splines";
1525 bool changed =
false;
1529 bool changed_layer =
false;
1539 changed_layer =
true;
1543 if (changed_layer) {
1565 ot->
name =
"Switch Direction";
1567 ot->
idname =
"MASK_OT_switch_direction";
1583 bool changed =
false;
1587 bool changed_layer =
false;
1594 for (
int i = 0; i < spline->tot_point; i++) {
1600 changed_layer =
true;
1605 if (changed_layer) {
1628 ot->
name =
"Recalculate Handles";
1629 ot->
description =
"Recalculate the direction of selected handles";
1630 ot->
idname =
"MASK_OT_normals_make_consistent";
1647 bool changed =
false;
1655 for (
int i = 0; i < spline->tot_point; i++) {
1662 bezt->
h1 = handle_type;
1663 bezt->
h2 = handle_type;
1667 bezt->
h1 = handle_type;
1670 bezt->
h2 = handle_type;
1698 {
HD_AUTO,
"AUTO", 0,
"Auto",
""},
1699 {
HD_VECT,
"VECTOR", 0,
"Vector",
""},
1700 {
HD_ALIGN,
"ALIGNED", 0,
"Aligned Single",
""},
1702 {
HD_FREE,
"FREE", 0,
"Free",
""},
1707 ot->
name =
"Set Handle Type";
1708 ot->
description =
"Set type of handles for selected control points";
1709 ot->
idname =
"MASK_OT_handle_type_set";
1727 bool changed =
false;
1752 ot->
name =
"Clear Restrict View";
1753 ot->
description =
"Reveal the layer by setting the hide flag";
1754 ot->
idname =
"MASK_OT_hide_view_clear";
1770 bool changed =
false;
1812 ot->
name =
"Set Restrict View";
1813 ot->
description =
"Hide the layer by setting the hide flag";
1814 ot->
idname =
"MASK_OT_hide_view_set";
1824 ot->
srna,
"unselected", 0,
"Unselected",
"Hide unselected rather than selected layers");
1830 bool changed =
false;
1838 for (
int i = 0; i < spline->tot_point; i++) {
1864 ot->
name =
"Clear Feather Weight";
1866 ot->
idname =
"MASK_OT_feather_weight_clear";
1883 return mask->masklay_tot > 0;
1900 if (direction == -1) {
1901 mask_layer_other = mask_layer->
prev;
1903 if (!mask_layer_other) {
1909 mask->masklay_act--;
1911 else if (direction == 1) {
1912 mask_layer_other = mask_layer->
next;
1914 if (!mask_layer_other) {
1920 mask->masklay_act++;
1932 {-1,
"UP", 0,
"Up",
""},
1933 {1,
"DOWN", 0,
"Down",
""},
1939 ot->
description =
"Move the active layer up/down in the list";
1955 "Direction to move the active layer");
1965 for (
MaskSpline *spline = mask_layer->splines.last; spline; spline = spline->
prev) {
1968 while (i < spline->tot_point) {
1969 int start = i, end = -1;
1974 if (i >= spline->tot_point - 1) {
1982 int tot_point_shape_start = 0;
1989 if (new_spline->
points) {
1994 new_spline->
flag = spline->flag;
2000 new_spline->
tot_point = end - start + 1;
2002 "duplicated mask points");
2004 memcpy(new_spline->
points,
2005 spline->points + start,
2011 if (mask_layer->splines_shapes.first) {
2017 for (b = 0, new_point = new_spline->
points; b < tot_point; b++, new_point++) {
2018 if (new_point->
uw) {
2023 if (mask_layer->splines_shapes.first) {
2031 if (start != 0 || end != spline->tot_point - 1) {
2040 mask_layer->act_spline = new_spline;
2058 ot->
name =
"Duplicate Mask";
2059 ot->
description =
"Duplicate selected control points and segments between them";
2077 if (mask_layer ==
NULL) {
2089 ot->
name =
"Copy Splines";
2091 ot->
idname =
"MASK_OT_copy_splines";
2117 if (mask_layer ==
NULL) {
2133 ot->
name =
"Paste Splines";
2135 ot->
idname =
"MASK_OT_paste_splines";
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct SpaceClip * CTX_wm_space_clip(const bContext *C)
struct Mask * CTX_data_edit_mask(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
#define MASKPOINT_ISSEL_ANY(p)
void BKE_mask_layer_shape_changed_add(struct MaskLayer *masklay, int index, bool do_init, bool do_init_interpolate)
void BKE_mask_point_select_set(struct MaskSplinePoint *point, const bool do_select)
void BKE_mask_layer_remove(struct Mask *mask, struct MaskLayer *masklay)
@ MASK_WHICH_HANDLE_RIGHT
@ MASK_WHICH_HANDLE_STICK
void BKE_mask_spline_free(struct MaskSpline *spline)
struct MaskLayer * BKE_mask_layer_new(struct Mask *mask, const char *name)
void BKE_mask_point_free(struct MaskSplinePoint *point)
struct MaskLayer * BKE_mask_layer_active(struct Mask *mask)
struct MaskSplinePointUW * BKE_mask_point_sort_uw(struct MaskSplinePoint *point, struct MaskSplinePointUW *uw)
void BKE_mask_layer_active_set(struct Mask *mask, struct MaskLayer *masklay)
float BKE_mask_spline_project_co(struct MaskSpline *spline, struct MaskSplinePoint *point, float start_u, const float co[2], const eMaskSign sign)
void BKE_mask_point_set_handle(struct MaskSplinePoint *point, eMaskWhichHandle which_handle, float loc[2], bool keep_direction, float orig_handle[2], float orig_vec[3][3])
struct MaskSpline * BKE_mask_spline_copy(const struct MaskSpline *spline)
void BKE_mask_clipboard_paste_to_layer(struct Main *bmain, struct MaskLayer *mask_layer)
void BKE_mask_coord_to_movieclip(struct MovieClip *clip, struct MovieClipUser *user, float r_co[2], const float co[2])
void BKE_mask_layer_free_shapes(struct MaskLayer *masklay)
Free all animation keys for a mask layer.
void BKE_mask_point_handle(const struct MaskSplinePoint *point, eMaskWhichHandle which_handle, float r_handle[2])
void BKE_mask_calc_handle_point_auto(struct MaskSpline *spline, struct MaskSplinePoint *point, const bool do_recalc_length)
Resets auto handles even for non-auto bezier points.
void BKE_mask_point_normal(struct MaskSpline *spline, struct MaskSplinePoint *point, float u, float n[2])
void BKE_mask_point_segment_co(struct MaskSpline *spline, struct MaskSplinePoint *point, float u, float co[2])
struct MaskSplinePoint * BKE_mask_spline_point_array(struct MaskSpline *spline)
int BKE_mask_layer_shape_spline_to_index(struct MaskLayer *masklay, struct MaskSpline *spline)
void BKE_mask_coord_from_movieclip(struct MovieClip *clip, struct MovieClipUser *user, float r_co[2], const float co[2])
void BKE_mask_layer_shape_changed_remove(struct MaskLayer *masklay, int index, int count)
bool BKE_mask_clipboard_is_empty(void)
float BKE_mask_point_weight_scalar(struct MaskSpline *spline, struct MaskSplinePoint *point, const float u)
struct BezTriple * BKE_mask_spline_point_next_bezt(struct MaskSpline *spline, struct MaskSplinePoint *points_array, struct MaskSplinePoint *point)
void BKE_mask_clipboard_copy_from_layer(struct MaskLayer *mask_layer)
struct MaskSpline * BKE_mask_spline_add(struct MaskLayer *masklay)
void BKE_mask_spline_direction_switch(struct MaskLayer *masklay, struct MaskSpline *spline)
struct Mask * BKE_mask_new(struct Main *bmain, const char *name)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float min_ff(float a, float b)
MINLINE float square_f(float a)
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void project_v2_v2v2_normalized(float out[2], const float p[2], const float v_proj[2])
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], const float t)
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], float f)
MINLINE void sub_v2_v2(float r[2], const float a[2])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void negate_v2(float r[2])
void minmax_v2v2_v2(float min[2], float max[2], const float vec[2])
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
#define INIT_MINMAX2(min, max)
struct Depsgraph Depsgraph
void DEG_id_tag_update(struct ID *id, int flag)
struct ID * DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id)
@ ID_RECALC_COPY_ON_WRITE
#define MASK_RESTRICT_SELECT
#define MASK_RESTRICT_VIEW
@ MCLIP_PROXY_RENDER_UNDISTORT
Object is a sort of wrapper for general info.
void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask)
void ED_clip_point_undistorted_pos(struct SpaceClip *sc, const float co[2], float r_co[2])
void ED_space_image_set_mask(struct bContext *C, struct SpaceImage *sima, struct Mask *mask)
#define IS_AUTOKEY_ON(scene)
void ED_mask_layer_shape_auto_key(struct MaskLayer *mask_layer, const int frame)
void ED_mask_mouse_pos(struct ScrArea *area, struct ARegion *region, const int mval[2], float co[2])
void ED_mask_get_size(struct ScrArea *area, int *width, int *height)
bool ED_operator_mask(struct bContext *C)
NSNotificationCenter * center
_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 GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble u2
_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 GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
Read Guarded memory(de)allocation.
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert * v
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
const Depsgraph * depsgraph
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
void ED_mask_view_lock_state_restore_no_jump(const bContext *C, const MaskViewLockState *state)
bool ED_maskedit_mask_poll(bContext *C)
bool ED_maskedit_poll(bContext *C)
void ED_mask_view_lock_state_store(const bContext *C, MaskViewLockState *state)
void ED_mask_select_flush_all(struct Mask *mask)
struct MaskSplinePoint * ED_mask_point_find_nearest(const struct bContext *C, struct Mask *mask, const float normal_co[2], const float threshold, struct MaskLayer **r_mask_layer, struct MaskSpline **r_spline, eMaskWhichHandle *r_which_handle, float *r_score)
bool ED_mask_find_nearest_diff_point(const struct bContext *C, struct Mask *mask, const float normal_co[2], int threshold, bool feather, float tangent[2], const bool use_deform, const bool use_project, struct MaskLayer **r_mask_layer, struct MaskSpline **r_spline, struct MaskSplinePoint **r_point, float *r_u, float *r_score)
void ED_mask_layer_select_set(struct MaskLayer *mask_layer, const bool do_select)
void ED_mask_select_toggle_all(struct Mask *mask, int action)
bool ED_mask_layer_select_check(const struct MaskLayer *mask_layer)
bool ED_mask_feather_find_nearest(const struct bContext *C, struct Mask *mask, const float normal_co[2], const float threshold, struct MaskLayer **r_mask_layer, struct MaskSpline **r_spline, struct MaskSplinePoint **r_point, struct MaskSplinePointUW **r_uw, float *r_score)
bool ED_mask_spline_select_check(const struct MaskSpline *spline)
static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event)
static void cancel_slide_point(SlidePointData *data)
static bool paste_splines_poll(bContext *C)
static void cancel_slide_spline_curvature(SlideSplineCurvatureData *slide_data)
struct SlidePointData SlidePointData
static int paste_splines_exec(bContext *C, wmOperator *UNUSED(op))
static int mask_hide_view_set_exec(bContext *C, wmOperator *op)
void MASK_OT_slide_spline_curvature(wmOperatorType *ot)
void MASK_OT_copy_splines(wmOperatorType *ot)
static int mask_new_exec(bContext *C, wmOperator *op)
static void check_sliding_handle_type(MaskSplinePoint *point, eMaskWhichHandle which_handle)
void MASK_OT_layer_move(wmOperatorType *ot)
static int slide_point_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void MASK_OT_feather_weight_clear(wmOperatorType *ot)
void MASK_OT_layer_remove(wmOperatorType *ot)
static bool slide_point_check_initial_feather(MaskSpline *spline)
struct SlideSplineCurvatureData SlideSplineCurvatureData
void MASK_OT_paste_splines(wmOperatorType *ot)
static int mask_hide_view_clear_exec(bContext *C, wmOperator *op)
void MASK_OT_layer_new(wmOperatorType *ot)
static int mask_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
static bool slide_spline_curvature_check(bContext *C, const wmEvent *event)
static int delete_exec(bContext *C, wmOperator *UNUSED(op))
static int mask_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
static int slide_spline_curvature_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void select_sliding_point(Mask *mask, MaskLayer *mask_layer, MaskSpline *spline, MaskSplinePoint *point, eMaskWhichHandle which_handle)
static void * slide_point_customdata(bContext *C, wmOperator *op, const wmEvent *event)
static int set_handle_type_exec(bContext *C, wmOperator *op)
static int mask_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
static void mask_point_undistort_pos(SpaceClip *sc, float r_co[2], const float co[2])
static void free_slide_spline_curvature_data(SlideSplineCurvatureData *slide_data)
Mask * ED_mask_new(bContext *C, const char *name)
static void slide_spline_solve_P1(const float u, const float B[2], const float P0[2], const float P2[2], const float P3[2], float solution[2])
void MASK_OT_hide_view_clear(wmOperatorType *ot)
static bool mask_layer_move_poll(bContext *C)
static int mask_layer_new_exec(bContext *C, wmOperator *op)
void MASK_OT_new(wmOperatorType *ot)
static int copy_splines_exec(bContext *C, wmOperator *UNUSED(op))
static void slide_point_delta_all_feather(SlidePointData *data, float delta)
void MASK_OT_handle_type_set(wmOperatorType *ot)
static int mask_normals_make_consistent_exec(bContext *C, wmOperator *UNUSED(op))
void MASK_OT_duplicate(wmOperatorType *ot)
static SlideSplineCurvatureData * slide_spline_curvature_customdata(bContext *C, const wmEvent *event)
void MASK_OT_cyclic_toggle(wmOperatorType *ot)
static int cyclic_toggle_exec(bContext *C, wmOperator *UNUSED(op))
MaskLayer * ED_mask_layer_ensure(bContext *C, bool *r_added_mask)
static void slide_spline_solve_P2(const float u, const float B[2], const float P0[2], const float P1[2], const float P3[2], float solution[2])
static void free_slide_point_data(SlidePointData *data)
void MASK_OT_delete(wmOperatorType *ot)
static void delete_feather_points(MaskSplinePoint *point)
static bool spline_under_mouse_get(const bContext *C, Mask *mask_orig, const float co[2], MaskLayer **r_mask_layer, MaskSpline **r_mask_spline)
static int mask_feather_weight_clear_exec(bContext *C, wmOperator *UNUSED(op))
void MASK_OT_hide_view_set(wmOperatorType *ot)
static int slide_spline_curvature_modal(bContext *C, wmOperator *op, const wmEvent *event)
void MASK_OT_slide_point(wmOperatorType *ot)
void MASK_OT_switch_direction(wmOperatorType *ot)
void MASK_OT_normals_make_consistent(wmOperatorType *ot)
static int mask_layer_move_exec(bContext *C, wmOperator *op)
static void slide_point_restore_spline(SlidePointData *data)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
struct MaskSplinePoint * act_point
struct MaskSpline * act_spline
float orig_handle_coord[2]
float prev_handle_coord[2]
float prev_feather_coord[2]
eMaskWhichHandle which_handle
bool is_sliding_new_point
float prev_mouse_coord[2]
float prev_spline_coord[2]
float prev_mouse_coord[2]
BezTriple other_bezt_backup
struct MovieClipUser user
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_confirm(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))