Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mask/mask_ops.c
| Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, | ||||
| MaskSpline *point_spline = NULL; | MaskSpline *point_spline = NULL; | ||||
| MaskSplinePoint *point = NULL; | MaskSplinePoint *point = NULL; | ||||
| float co[2]; | float co[2]; | ||||
| const float threshold_sq = threshold * threshold; | const float threshold_sq = threshold * threshold; | ||||
| float len_sq = FLT_MAX, scalex, scaley; | float len_sq = FLT_MAX, scalex, scaley; | ||||
| eMaskWhichHandle which_handle = MASK_WHICH_HANDLE_NONE; | eMaskWhichHandle which_handle = MASK_WHICH_HANDLE_NONE; | ||||
| int width, height; | int width, height; | ||||
| Depsgraph *depsgraph = CTX_data_evaluated_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask_orig->id); | Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask_orig->id); | ||||
| ED_mask_get_size(sa, &width, &height); | ED_mask_get_size(sa, &width, &height); | ||||
| ED_mask_pixelspace_factor(sa, ar, &scalex, &scaley); | ED_mask_pixelspace_factor(sa, ar, &scalex, &scaley); | ||||
| co[0] = normal_co[0] * scalex; | co[0] = normal_co[0] * scalex; | ||||
| co[1] = normal_co[1] * scaley; | co[1] = normal_co[1] * scaley; | ||||
| ▲ Show 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | bool ED_mask_feather_find_nearest(const bContext *C, | ||||
| MaskSpline *point_spline = NULL; | MaskSpline *point_spline = NULL; | ||||
| MaskSplinePoint *point = NULL; | MaskSplinePoint *point = NULL; | ||||
| MaskSplinePointUW *uw = NULL; | MaskSplinePointUW *uw = NULL; | ||||
| const float threshold_sq = threshold * threshold; | const float threshold_sq = threshold * threshold; | ||||
| float len = FLT_MAX, co[2]; | float len = FLT_MAX, co[2]; | ||||
| float scalex, scaley; | float scalex, scaley; | ||||
| int width, height; | int width, height; | ||||
| Depsgraph *depsgraph = CTX_data_evaluated_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask_orig->id); | Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask_orig->id); | ||||
| ED_mask_get_size(sa, &width, &height); | ED_mask_get_size(sa, &width, &height); | ||||
| ED_mask_pixelspace_factor(sa, ar, &scalex, &scaley); | ED_mask_pixelspace_factor(sa, ar, &scalex, &scaley); | ||||
| co[0] = normal_co[0] * scalex; | co[0] = normal_co[0] * scalex; | ||||
| co[1] = normal_co[1] * scaley; | co[1] = normal_co[1] * scaley; | ||||
| ▲ Show 20 Lines • Show All 2,181 Lines • Show Last 20 Lines | |||||