50 switch (
area->spacetype) {
83 if (mask_layer ==
NULL) {
132 mask->masklay_act =
mask->masklay_tot - 1;
143 ot->
name =
"Add Mask Layer";
178 ot->
name =
"Remove Mask Layer";
180 ot->
idname =
"MASK_OT_layer_remove";
255 float closest_dist_squared = 0.0f;
258 bool undistort =
false;
259 *r_mask_layer =
NULL;
260 *r_mask_spline =
NULL;
268 pixel_co[0] = co[0] *
width;
269 pixel_co[1] = co[1] *
height;
276 mask_layer_orig !=
NULL;
277 mask_layer_orig = mask_layer_orig->next, mask_layer_eval = mask_layer_eval->next) {
281 for (
MaskSpline *spline_orig = mask_layer_orig->splines.first,
282 *spline_eval = mask_layer_eval->splines.first;
284 spline_orig = spline_orig->next, spline_eval = spline_eval->next) {
285 if ((spline_orig->flag &
SELECT) == 0) {
291 for (
int i = 0; i < spline_orig->tot_point; i++) {
310 if (dist_squared <= max_bb_side * max_bb_side * 0.5f &&
311 (closest_spline ==
NULL || dist_squared < closest_dist_squared)) {
312 closest_layer = mask_layer_orig;
313 closest_spline = spline_orig;
314 closest_dist_squared = dist_squared;
333 if (
square_f(diff_score) < closest_dist_squared) {
338 *r_mask_layer = closest_layer;
339 *r_mask_spline = closest_spline;
347 for (
int i = 0; i < spline->
tot_point; i++) {
350 if (
point->bezt.weight != 0.0f) {
366 switch (which_handle) {
381 BLI_assert_msg(0,
"Unexpected situation in select_sliding_point()");
420 MaskLayer *mask_layer, *cv_mask_layer, *feather_mask_layer;
421 MaskSpline *spline, *cv_spline, *feather_spline;
426 float co[2], cv_score, feather_score;
437 C,
mask, co,
threshold, &cv_mask_layer, &cv_spline, &which_handle, &cv_score);
448 if (slide_feather || !cv_point || feather_score < cv_score) {
451 mask_layer = feather_mask_layer;
452 spline = feather_spline;
453 point = feather_point;
465 mask_layer = cv_mask_layer;
482 customdata->
spline = spline;
486 customdata->
action = action;
575 for (
int i = 0; i <
data->spline->tot_point; i++) {
580 if (
point->bezt.weight < 0.0f) {
581 point->bezt.weight = 0.0f;
588 for (
int i = 0; i <
data->spline->tot_point; i++) {
594 for (
int j = 0; j <
point->tot_uw; j++) {
595 point->uw[j] = orig_point->
uw[j];
604 if (
data->orig_spline) {
613 data->point->bezt.weight =
data->weight;
618 data->point->bezt.h1 =
data->old_h1;
619 data->point->bezt.h2 =
data->old_h2;
626 if (
data->orig_spline) {
639 switch (event->
type) {
680 if (
data->is_accurate) {
689 &
data->spline->points[0],
690 &
data->spline->points[
data->spline->tot_point - 1])) {
691 SWAP(
float, delta[0], delta[1]);
695 if (
data->point != &
data->spline->points[0]) {
706 data->is_curvature_only,
707 data->orig_handle_coord,
711 if (
data->is_sliding_new_point) {
717 sub_v2_v2v2(vec, bezt->vec[1], bezt->vec[self_handle]);
718 add_v2_v2v2(bezt->vec[other_handle], bezt->vec[1], vec);
728 float vec[2], no[2], p[2],
c[2],
w, offco[2];
729 float *weight =
NULL;
730 float weight_scalar = 1.0f;
731 bool is_overall_feather =
data->is_overall_feather ||
data->is_initial_feather;
742 float dist_pos = FLT_MAX;
743 float dist_neg = FLT_MAX;
748 if (u_pos > 0.0f && u_pos < 1.0f) {
753 if (u_neg > 0.0f && u_neg < 1.0f) {
758 u = dist_pos < dist_neg ? u_pos : u_neg;
760 if (u > 0.0f && u < 1.0f) {
764 weight = &
data->uw->w;
766 if (weight_scalar != 0.0f) {
767 weight_scalar = 1.0f / weight_scalar;
775 weight = &bezt->weight;
787 if (is_overall_feather) {
794 w_delta =
w -
data->weight *
data->weight_scalar;
800 *weight =
data->weight;
805 if (
data->is_initial_feather) {
806 *weight =
w * weight_scalar;
816 if (
data->orig_spline) {
824 if (weight_scalar != 0.0f) {
825 *weight =
w * weight_scalar;
837 for (
int i = 0; i <
data->spline->tot_point; i++) {
863 if (
data->is_sliding_new_point) {
919 "First try to slide feather instead of vertex");
922 ot->
srna,
"is_new_point", 0,
"Slide New Point",
"Newly created vertex is being slid");
1012 if (next_bezt ==
NULL) {
1020 slide_data->
spline = spline;
1095 if (slide_data !=
NULL) {
1112 const float u2 = u * u, u3 = u * u * u;
1113 const float v = 1.0f - u;
1114 const float v2 =
v *
v, v3 =
v *
v *
v;
1115 const float inv_divider = 1.0f / (3.0f *
v2 * u);
1116 const float t = 3.0f *
v *
u2;
1117 solution[0] = -(v3 * P0[0] +
t * P2[0] + u3 * P3[0] -
B[0]) * inv_divider;
1118 solution[1] = -(v3 * P0[1] +
t * P2[1] + u3 * P3[1] -
B[1]) * inv_divider;
1128 const float u2 = u * u, u3 = u * u * u;
1129 const float v = 1.0f - u;
1130 const float v2 =
v *
v, v3 =
v *
v *
v;
1131 const float inv_divider = 1.0f / (3.0f *
v *
u2);
1132 const float t = 3.0f *
v2 * u;
1133 solution[0] = -(v3 * P0[0] +
t * P1[0] + u3 * P3[0] -
B[0]) * inv_divider;
1134 solution[1] = -(v3 * P0[1] +
t * P1[1] + u3 * P3[1] -
B[1]) * inv_divider;
1140 const float margin = 0.2f;
1142 float u = slide_data->
u;
1144 switch (event->
type) {
1156 if ((u > margin && u < 0.5f) || (u >= 0.5f && u < 1.0f - margin)) {
1179 float B[2], mouse_coord[2], delta[2];
1193 bool need_restore_P2 =
false;
1197 float x = (u - margin) * 0.5f / (0.5f - margin);
1198 float weight = (3 *
x *
x - 2 *
x *
x *
x);
1205 need_restore_P2 =
true;
1208 if (weight > 0.0f) {
1218 if (need_restore_P2) {
1224 bool need_restore_P1 =
false;
1226 if (u < 1.0f - margin) {
1228 float x = ((1.0f - u) - margin) * 0.5f / (0.5f - margin);
1229 float weight = 3 *
x *
x - 2 *
x *
x *
x;
1236 need_restore_P1 =
true;
1239 if (weight > 0.0f) {
1249 if (need_restore_P1) {
1293 ot->
name =
"Slide Spline Curvature";
1294 ot->
description =
"Slide a point on the spline to define its curvature";
1295 ot->
idname =
"MASK_OT_slide_spline_curvature";
1333 ot->
name =
"Toggle Cyclic";
1335 ot->
idname =
"MASK_OT_cyclic_toggle";
1351 if (!
point->tot_uw) {
1355 for (
int i = 0; i <
point->tot_uw; i++) {
1372 for (
int i = 0; i <
point->tot_uw; i++) {
1374 new_uw[j++] =
point->uw[i];
1388 bool changed =
false;
1392 int mask_layer_shape_ofs = 0;
1398 spline = mask_layer->splines.first;
1401 const int tot_point_orig = spline->
tot_point;
1406 for (
int i = 0; i < spline->
tot_point; i++) {
1419 if (spline == mask_layer->act_spline) {
1420 mask_layer->act_spline =
NULL;
1421 mask_layer->act_point =
NULL;
1431 for (
int i = 0, j = 0; i < tot_point_orig; i++) {
1435 if (
point == mask_layer->act_point) {
1436 mask_layer->act_point = &new_points[j];
1441 new_points[j] = *
point;
1445 if (
point == mask_layer->act_point) {
1446 mask_layer->act_point =
NULL;
1456 mask_layer_shape_ofs += spline->
tot_point;
1459 spline->
points = new_points;
1465 spline = next_spline;
1490 ot->
description =
"Delete selected control points or splines";
1508 bool changed =
false;
1512 bool changed_layer =
false;
1522 changed_layer =
true;
1526 if (changed_layer) {
1548 ot->
name =
"Switch Direction";
1550 ot->
idname =
"MASK_OT_switch_direction";
1566 bool changed =
false;
1570 bool changed_layer =
false;
1577 for (
int i = 0; i < spline->tot_point; i++) {
1583 changed_layer =
true;
1588 if (changed_layer) {
1610 ot->
name =
"Recalculate Handles";
1611 ot->
description =
"Recalculate the direction of selected handles";
1612 ot->
idname =
"MASK_OT_normals_make_consistent";
1629 bool changed =
false;
1637 for (
int i = 0; i < spline->tot_point; i++) {
1644 bezt->
h1 = handle_type;
1645 bezt->
h2 = handle_type;
1649 bezt->
h1 = handle_type;
1652 bezt->
h2 = handle_type;
1680 {
HD_AUTO,
"AUTO", 0,
"Auto",
""},
1681 {
HD_VECT,
"VECTOR", 0,
"Vector",
""},
1682 {
HD_ALIGN,
"ALIGNED", 0,
"Aligned Single",
""},
1684 {
HD_FREE,
"FREE", 0,
"Free",
""},
1689 ot->
name =
"Set Handle Type";
1690 ot->
description =
"Set type of handles for selected control points";
1691 ot->
idname =
"MASK_OT_handle_type_set";
1709 bool changed =
false;
1734 ot->
name =
"Clear Restrict View";
1735 ot->
description =
"Reveal the layer by setting the hide flag";
1736 ot->
idname =
"MASK_OT_hide_view_clear";
1752 bool changed =
false;
1794 ot->
name =
"Set Restrict View";
1795 ot->
description =
"Hide the layer by setting the hide flag";
1796 ot->
idname =
"MASK_OT_hide_view_set";
1806 ot->
srna,
"unselected", 0,
"Unselected",
"Hide unselected rather than selected layers");
1812 bool changed =
false;
1820 for (
int i = 0; i < spline->tot_point; i++) {
1846 ot->
name =
"Clear Feather Weight";
1848 ot->
idname =
"MASK_OT_feather_weight_clear";
1865 return mask->masklay_tot > 0;
1882 if (direction == -1) {
1883 mask_layer_other = mask_layer->
prev;
1885 if (!mask_layer_other) {
1891 mask->masklay_act--;
1893 else if (direction == 1) {
1894 mask_layer_other = mask_layer->
next;
1896 if (!mask_layer_other) {
1902 mask->masklay_act++;
1914 {-1,
"UP", 0,
"Up",
""},
1915 {1,
"DOWN", 0,
"Down",
""},
1921 ot->
description =
"Move the active layer up/down in the list";
1937 "Direction to move the active layer");
1947 for (
MaskSpline *spline = mask_layer->splines.last; spline; spline = spline->
prev) {
1950 while (i < spline->tot_point) {
1951 int start = i, end = -1;
1956 if (i >= spline->tot_point - 1) {
1964 int tot_point_shape_start = 0;
1971 if (new_spline->
points) {
1976 new_spline->
flag = spline->flag;
1982 new_spline->
tot_point = end - start + 1;
1984 "duplicated mask points");
1986 memcpy(new_spline->
points,
1987 spline->points + start,
1993 if (mask_layer->splines_shapes.first) {
1999 for (
b = 0, new_point = new_spline->
points;
b < tot_point;
b++, new_point++) {
2000 if (new_point->
uw) {
2005 if (mask_layer->splines_shapes.first) {
2013 if (start != 0 || end != spline->tot_point - 1) {
2022 mask_layer->act_spline = new_spline;
2040 ot->
name =
"Duplicate Mask";
2041 ot->
description =
"Duplicate selected control points and segments between them";
2059 if (mask_layer ==
NULL) {
2071 ot->
name =
"Copy Splines";
2073 ot->
idname =
"MASK_OT_copy_splines";
2099 if (mask_layer ==
NULL) {
2115 ot->
name =
"Paste Splines";
2117 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_layer_remove(struct Mask *mask, struct MaskLayer *masklay)
void BKE_mask_point_select_set(struct MaskSplinePoint *point, bool do_select)
void BKE_mask_calc_handle_point_auto(struct MaskSpline *spline, struct MaskSplinePoint *point, bool do_recalc_length)
Resets auto handles even for non-auto bezier points.
@ 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_point_weight_scalar(struct MaskSpline *spline, struct MaskSplinePoint *point, float u)
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_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_spline_project_co(struct MaskSpline *spline, struct MaskSplinePoint *point, float start_u, const float co[2], eMaskSign sign)
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)
#define BLI_assert_msg(a, msg)
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])
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)
void interp_v2_v2v2(float r[2], const float a[2], const float b[2], float t)
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
@ 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)
bool ED_maskedit_mask_visible_splines_poll(struct bContext *C)
bool ED_maskedit_poll(struct bContext *C)
bool ED_maskedit_mask_poll(struct bContext *C)
void ED_mask_mouse_pos(struct ScrArea *area, struct ARegion *region, const int mval[2], float co[2])
void ED_mask_layer_shape_auto_key(struct MaskLayer *mask_layer, int frame)
void ED_mask_get_size(struct ScrArea *area, int *width, int *height)
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 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 width
_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.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
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
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
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)
void ED_mask_view_lock_state_store(const bContext *C, MaskViewLockState *state)
void ED_mask_select_flush_all(struct Mask *mask)
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], bool use_deform, 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, 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_spline_select_check(const struct MaskSpline *spline)
bool ED_mask_feather_find_nearest(const struct bContext *C, struct Mask *mask, const float normal_co[2], float threshold, struct MaskLayer **r_mask_layer, struct MaskSpline **r_spline, struct MaskSplinePoint **r_point, struct MaskSplinePointUW **r_uw, float *r_score)
struct MaskSplinePoint * ED_mask_point_find_nearest(const struct bContext *C, struct Mask *mask, const float normal_co[2], float threshold, struct MaskLayer **r_mask_layer, struct MaskSpline **r_spline, eMaskWhichHandle *r_which_handle, float *r_score)
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)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
static void area(int d1, int d2, int e1, int e2, float weights[2])
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
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
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))