48 for (
int i = 0; i < spline->tot_point; i++) {
91 spline->flag &= ~SELECT;
94 for (
int i = 0; i < spline->tot_point; i++) {
104 if (do_select ==
true) {
139 for (
int i = 0; i < spline->tot_point; i++) {
155 spline->flag &= ~SELECT;
163 for (
int i = 0; i < spline->tot_point; i++) {
172 for (j = 0; j < cur_point->
tot_uw; j++) {
223 ot->
name =
"(De)select All";
256 const float threshold = 19;
264 C, mask, co, threshold, &mask_layer, &spline, &which_handle,
nullptr);
266 if (extend ==
false && deselect ==
false && toggle ==
false) {
332 C, mask, co, threshold, &mask_layer, &spline, &point, &uw,
nullptr))
422 "Location of vertex in normalized space",
444 bool changed =
false;
462 mask_layer_orig !=
nullptr;
463 mask_layer_orig = mask_layer_orig->next, mask_layer_eval = mask_layer_eval->next)
469 *spline_eval =
static_cast<MaskSpline *
>(mask_layer_eval->splines.first);
470 spline_orig !=
nullptr;
471 spline_orig = spline_orig->
next, spline_eval = spline_eval->
next)
476 for (
int i = 0; i < spline_orig->tot_point; i++) {
540 bool changed =
false;
554 mask_layer_orig !=
nullptr;
555 mask_layer_orig = mask_layer_orig->next, mask_layer_eval = mask_layer_eval->next)
561 *spline_eval =
static_cast<MaskSpline *
>(mask_layer_eval->splines.first);
562 spline_orig !=
nullptr;
563 spline_orig = spline_orig->
next, spline_eval = spline_eval->
next)
568 for (
int i = 0; i < spline_orig->tot_point; i++) {
626 ot->
name =
"Lasso Select";
627 ot->
description =
"Select curve points using lasso selection";
628 ot->
idname =
"MASK_OT_select_lasso";
652 const float offset[2],
653 const float ellipse[2])
658 x = (bezt->
vec[1][0] - offset[0]) * ellipse[0];
659 y = (bezt->
vec[1][1] - offset[1]) * ellipse[1];
661 return x * x + y * y < 1.0f;
673 float zoomx, zoomy, offset[2], ellipse[2];
675 bool changed =
false;
685 width = height =
max_ii(width, height);
687 ellipse[0] = width * zoomx / radius;
688 ellipse[1] = height * zoomy / radius;
704 mask_layer_orig !=
nullptr;
705 mask_layer_orig = mask_layer_orig->next, mask_layer_eval = mask_layer_eval->next)
711 *spline_eval =
static_cast<MaskSpline *
>(mask_layer_eval->splines.first);
712 spline_orig !=
nullptr;
713 spline_orig = spline_orig->
next, spline_eval = spline_eval->
next)
718 for (
int i = 0; i < spline_orig->tot_point; i++) {
747 ot->
name =
"Circle Select";
748 ot->
description =
"Select curve points using circle selection";
749 ot->
idname =
"MASK_OT_select_circle";
783 const float threshold = 19;
784 bool changed =
false;
789 C, mask, co, threshold, &mask_layer, &spline,
nullptr,
nullptr);
814 ot->
name =
"Select Linked";
815 ot->
idname =
"MASK_OT_select_linked_pick";
816 ot->
description =
"(De)select all points linked to the curve under the mouse cursor";
838 bool changed =
false;
869 ot->
name =
"Select Linked All";
870 ot->
idname =
"MASK_OT_select_linked";
871 ot->
description =
"Select all curve points linked to already selected ones";
898 bool start_sel, end_sel, prev_sel, cur_sel;
901 for (
int i = 0; i < spline->tot_point; i++) {
906 if (spline->tot_point < 2) {
919 for (
int i = 0; i < spline->tot_point; i++) {
920 if (i == 0 && !cyclic) {
927 if (cur_sel != more) {
928 if (prev_sel == more) {
935 for (
int i = spline->tot_point - 1; i >= 0; i--) {
936 if (i == spline->tot_point - 1 && !cyclic) {
944 if (cur_sel != more) {
945 if (prev_sel == more) {
970 ot->
description =
"Select more spline points connected to initial selection";
990 ot->
description =
"Deselect spline points at the boundary of each selection region";
Mask * CTX_data_edit_mask(const bContext *C)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
#define MASKPOINT_ISSEL_ANY(p)
void BKE_mask_point_select_set(struct MaskSplinePoint *point, bool do_select)
#define MASKPOINT_ISSEL_KNOT(p)
#define MASKPOINT_ISSEL_HANDLE(point, which_handle)
void BKE_mask_point_select_set_handle(struct MaskSplinePoint *point, eMaskWhichHandle which_handle, bool do_select)
struct MaskSplinePoint * BKE_mask_spline_point_array(struct MaskSpline *spline)
bool BLI_lasso_is_point_inside(blender::Span< blender::int2 > mcoords, int sx, int sy, int error_value)
void BLI_lasso_boundbox(rcti *rect, blender::Span< blender::int2 > mcoords)
#define LISTBASE_FOREACH(type, var, list)
MINLINE int max_ii(int a, int b)
bool BLI_rctf_isect_pt_v(const struct rctf *rect, const float xy[2])
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
void DEG_id_tag_update(ID *id, unsigned int flags)
ID * DEG_get_evaluated_id(const Depsgraph *depsgraph, ID *id)
void ED_mask_mouse_pos(ScrArea *area, ARegion *region, const int mval[2], float r_co[2])
void ED_mask_point_pos(ScrArea *area, ARegion *region, float x, float y, float *r_x, float *r_y)
void ED_mask_zoom(ScrArea *area, ARegion *region, float *r_zoomx, float *r_zoomy)
void ED_mask_get_size(ScrArea *area, int *r_width, int *r_height)
void ED_mask_point_pos__reverse(ScrArea *area, ARegion *region, float x, float y, float *r_x, float *r_y)
bool ED_maskedit_mask_visible_splines_poll(bContext *C)
eSelectOp ED_select_op_modal(eSelectOp sel_op, bool is_first)
#define SEL_OP_USE_PRE_DESELECT(sel_op)
std::string ED_select_circle_get_name(wmOperatorType *ot, PointerRNA *ptr)
void std::string ED_select_pick_get_name(wmOperatorType *ot, PointerRNA *ptr)
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 Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture 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
@ OPTYPE_DEPENDS_ON_CURSOR
const Depsgraph * depsgraph
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)
MaskSplinePoint * ED_mask_point_find_nearest(const bContext *C, Mask *mask_orig, const float normal_co[2], float threshold, MaskLayer **r_mask_layer, MaskSpline **r_spline, eMaskWhichHandle *r_which_handle, float *r_score)
bool ED_mask_feather_find_nearest(const bContext *C, Mask *mask_orig, const float normal_co[2], float threshold, MaskLayer **r_mask_layer, MaskSpline **r_spline, MaskSplinePoint **r_point, MaskSplinePointUW **r_uw, float *r_score)
void MASK_OT_select_circle(wmOperatorType *ot)
static int mask_select_more_less(bContext *C, bool more)
static int select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bool ED_mask_spline_select_check(const MaskSpline *spline)
static int select_exec(bContext *C, wmOperator *op)
void MASK_OT_select_more(wmOperatorType *ot)
static int select_all_exec(bContext *C, wmOperator *op)
static int box_select_exec(bContext *C, wmOperator *op)
void MASK_OT_select(wmOperatorType *ot)
bool ED_mask_select_check(const Mask *mask)
static int mask_spline_point_inside_ellipse(BezTriple *bezt, const float offset[2], const float ellipse[2])
static int clip_lasso_select_exec(bContext *C, wmOperator *op)
void ED_mask_layer_select_set(MaskLayer *mask_layer, const bool do_select)
static bool do_lasso_select_mask(bContext *C, const Span< int2 > mcoords, const eSelectOp sel_op)
void MASK_OT_select_less(wmOperatorType *ot)
static int circle_select_exec(bContext *C, wmOperator *op)
void ED_mask_spline_select_set(MaskSpline *spline, const bool do_select)
void MASK_OT_select_linked(wmOperatorType *ot)
static int mask_select_linked_exec(bContext *C, wmOperator *)
static int mask_select_more_exec(bContext *C, wmOperator *)
bool ED_mask_layer_select_check(const MaskLayer *mask_layer)
void MASK_OT_select_box(wmOperatorType *ot)
void ED_mask_select_flush_all(Mask *mask)
void MASK_OT_select_all(wmOperatorType *ot)
void MASK_OT_select_lasso(wmOperatorType *ot)
static int mask_select_less_exec(bContext *C, wmOperator *)
void ED_mask_select_toggle_all(Mask *mask, int action)
void ED_mask_deselect_all(const bContext *C)
static int mask_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void MASK_OT_select_linked_pick(wmOperatorType *ot)
ccl_device_inline float4 select(const int4 mask, const float4 a, const float4 b)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
int RNA_int_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_float_set_array(PointerRNA *ptr, const char *name, const float *values)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
struct MaskSplinePoint * act_point
struct MaskSpline * act_spline
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* modal)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
std::string(* get_name)(wmOperatorType *ot, PointerRNA *ptr)
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* cancel)(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
bool WM_gesture_is_modal_first(const wmGesture *gesture)
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_circle_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Array< int2 > WM_gesture_lasso_path_to_array(bContext *, wmOperator *op)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event)
void WM_gesture_lasso_cancel(bContext *C, wmOperator *op)
int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void WM_operator_properties_border_to_rcti(wmOperator *op, rcti *r_rect)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
void WM_operator_properties_select_operation_simple(wmOperatorType *ot)
void WM_operator_properties_gesture_lasso(wmOperatorType *ot)
void WM_operator_properties_gesture_circle(wmOperatorType *ot)
void WM_operator_properties_select_all(wmOperatorType *ot)
void WM_operator_properties_mouse_select(wmOperatorType *ot)
int WM_operator_flag_only_pass_through_on_press(int retval, const wmEvent *event)