|
Blender V4.3
|
#include <algorithm>#include "MEM_guardedalloc.h"#include "BKE_context.hh"#include "BKE_curve.hh"#include "BKE_mask.h"#include "BLI_math_matrix.h"#include "BLI_math_vector.h"#include "DEG_depsgraph.hh"#include "DNA_mask_types.h"#include "DNA_scene_types.h"#include "DNA_screen_types.h"#include "WM_api.hh"#include "WM_types.hh"#include "ED_mask.hh"#include "ED_select_utils.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "mask_intern.hh"Go to the source code of this file.
Functions | |
Add Vertex | |
| static void | setup_vertex_point (Mask *mask, MaskSpline *spline, MaskSplinePoint *new_point, const float point_co[2], const float u, const float ctime, const MaskSplinePoint *reference_point, const bool reference_adjacent) |
Add Extrude Vertex | |
| static void | finSelectedSplinePoint (MaskLayer *mask_layer, MaskSpline **spline, MaskSplinePoint **point, bool check_active) |
Add Subdivide Vertex | |
| static void | mask_spline_add_point_at_index (MaskSpline *spline, int point_index) |
| static bool | add_vertex_subdivide (const bContext *C, Mask *mask, const float co[2]) |
| static bool | add_vertex_extrude (const bContext *C, Mask *mask, MaskLayer *mask_layer, const float co[2]) |
| static bool | add_vertex_new (const bContext *C, Mask *mask, MaskLayer *mask_layer, const float co[2]) |
| static void | mask_point_make_pixel_space (bContext *C, const float point_normalized[2], float point_pixel[2]) |
| static int | add_vertex_handle_cyclic_at_point (bContext *C, Mask *mask, MaskSpline *spline, MaskSplinePoint *active_point, MaskSplinePoint *other_point, float co[2]) |
| static int | add_vertex_handle_cyclic (bContext *C, Mask *mask, MaskSpline *spline, MaskSplinePoint *active_point, float co[2]) |
Add Vertex Operator | |
| static int | add_vertex_exec (bContext *C, wmOperator *op) |
| static int | add_vertex_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | MASK_OT_add_vertex (wmOperatorType *ot) |
Add Feather Vertex Operator | |
| static int | add_feather_vertex_exec (bContext *C, wmOperator *op) |
| static int | add_feather_vertex_invoke (bContext *C, wmOperator *op, const wmEvent *event) |
| void | MASK_OT_add_feather_vertex (wmOperatorType *ot) |
Common Primitive Functions | |
| static BezTriple * | points_to_bezier (const float(*points)[2], const int num_points, const char handle_type, const float scale, const float location[2]) |
| static int | create_primitive_from_points (bContext *C, wmOperator *op, const float(*points)[2], int num_points, char handle_type) |
| static int | primitive_add_invoke (bContext *C, wmOperator *op, const wmEvent *) |
| static void | define_primitive_add_properties (wmOperatorType *ot) |
Primitive Add Circle Operator | |
| static int | primitive_circle_add_exec (bContext *C, wmOperator *op) |
| void | MASK_OT_primitive_circle_add (wmOperatorType *ot) |
Primitive Add Square Operator | |
| static int | primitive_square_add_exec (bContext *C, wmOperator *op) |
| void | MASK_OT_primitive_square_add (wmOperatorType *ot) |
|
static |
Definition at line 616 of file mask_add.cc.
References BKE_mask_point_add_uw(), BKE_mask_point_weight(), BKE_mask_point_weight_scalar(), CTX_data_edit_mask(), DEG_id_tag_update(), ED_mask_find_nearest_diff_point(), ED_mask_point_find_nearest(), ID_RECALC_GEOMETRY, NA_EDITED, NC_MASK, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_float_get_array(), w(), and WM_event_add_notifier().
Referenced by add_feather_vertex_invoke(), and MASK_OT_add_feather_vertex().
|
static |
Definition at line 665 of file mask_add.cc.
References add_feather_vertex_exec(), CTX_wm_area(), CTX_wm_region(), ED_mask_mouse_pos(), wmEvent::mval, wmOperator::ptr, and RNA_float_set_array().
Referenced by MASK_OT_add_feather_vertex().
|
static |
Definition at line 516 of file mask_add.cc.
References MaskLayer::act_point, MaskLayer::act_spline, add_vertex_extrude(), add_vertex_handle_cyclic(), add_vertex_new(), add_vertex_subdivide(), BKE_mask_layer_active(), CTX_data_edit_mask(), DEG_id_tag_update(), ED_mask_new(), ED_mask_view_lock_state_restore_no_jump(), ED_mask_view_lock_state_store(), ID_RECALC_GEOMETRY, MASK_HIDE_SELECT, MASK_HIDE_VIEW, MASKPOINT_ISSEL_ANY, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, wmOperator::ptr, RNA_float_get_array(), and MaskLayer::visibility_flag.
Referenced by add_vertex_invoke(), and MASK_OT_add_vertex().
|
static |
Definition at line 296 of file mask_add.cc.
References MaskLayer::act_point, BKE_mask_calc_tangent_polyline(), BKE_mask_layer_shape_changed_add(), BKE_mask_layer_shape_spline_to_index(), BLI_assert, CTX_data_scene(), dot_v2v2(), ED_mask_select_toggle_all(), finSelectedSplinePoint(), ListBase::first, int, mask_spline_add_point_at_index(), MASK_SPLINE_CYCLIC, MASKPOINT_DESEL_ALL, NA_EDITED, NC_MASK, point, print_v2(), printf, SEL_DESELECT, setup_vertex_point(), MaskLayer::splines_shapes, sub_v2_v2v2(), and WM_event_add_notifier().
Referenced by add_vertex_exec().
|
static |
Definition at line 494 of file mask_add.cc.
References add_vertex_handle_cyclic_at_point(), and OPERATOR_PASS_THROUGH.
Referenced by add_vertex_exec().
|
static |
Definition at line 454 of file mask_add.cc.
References MaskSplinePoint::bezt, BKE_mask_calc_handle_point_auto(), DEG_id_tag_update(), ID_RECALC_GEOMETRY, len_squared_v2v2(), mask_point_make_pixel_space(), MASK_SPLINE_CYCLIC, NA_EDITED, NC_MASK, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, BezTriple::vec, and WM_event_add_notifier().
Referenced by add_vertex_handle_cyclic().
|
static |
Definition at line 568 of file mask_add.cc.
References add_vertex_exec(), CTX_wm_area(), CTX_wm_region(), ED_mask_mouse_pos(), wmEvent::mval, wmOperator::ptr, and RNA_float_set_array().
Referenced by MASK_OT_add_vertex().
|
static |
Definition at line 399 of file mask_add.cc.
References MaskLayer::act_point, MaskLayer::act_spline, BKE_mask_layer_new(), BKE_mask_layer_shape_changed_add(), BKE_mask_layer_shape_spline_to_index(), BKE_mask_spline_add(), CTX_data_scene(), ED_mask_select_toggle_all(), int, NA_EDITED, NC_MASK, SEL_DESELECT, setup_vertex_point(), and WM_event_add_notifier().
Referenced by add_vertex_exec().
Definition at line 241 of file mask_add.cc.
References MaskLayer::act_point, MaskLayer::act_spline, BKE_mask_layer_shape_changed_add(), BKE_mask_layer_shape_spline_to_index(), CTX_data_scene(), ED_mask_find_nearest_diff_point(), ED_mask_select_toggle_all(), mask_spline_add_point_at_index(), NA_EDITED, NC_MASK, SEL_DESELECT, setup_vertex_point(), and WM_event_add_notifier().
Referenced by add_vertex_exec().
|
static |
Definition at line 740 of file mask_add.cc.
References MaskLayer::act_point, MaskLayer::act_spline, MaskSplinePoint::bezt, BKE_mask_coord_from_frame(), BKE_mask_layer_shape_changed_add(), BKE_mask_layer_shape_spline_to_index(), BKE_mask_parent_init(), BKE_mask_point_select_set(), BKE_mask_spline_add(), CTX_data_edit_mask(), CTX_wm_area(), DEG_id_tag_update(), ED_mask_get_size(), ED_mask_layer_ensure(), ED_mask_select_toggle_all(), ED_mask_view_lock_state_restore_no_jump(), ED_mask_view_lock_state_store(), ListBase::first, MaskSpline::flag, float, ID_RECALC_GEOMETRY, MASK_SPLINE_CYCLIC, max_ii(), MEM_freeN(), MEM_recallocN, NA_ADDED, NA_EDITED, NC_MASK, OPERATOR_FINISHED, MaskSplinePoint::parent, MaskSpline::points, points_to_bezier(), wmOperator::ptr, RNA_float_get(), RNA_float_get_array(), SEL_DESELECT, SELECT, MaskLayer::splines_shapes, MaskSpline::tot_point, and WM_event_add_notifier().
Referenced by primitive_circle_add_exec(), and primitive_square_add_exec().
|
static |
Definition at line 831 of file mask_add.cc.
References FLT_MAX, ot, RNA_def_float(), RNA_def_float_vector(), and wmOperatorType::srna.
Referenced by MASK_OT_primitive_circle_add(), and MASK_OT_primitive_square_add().
|
static |
Definition at line 174 of file mask_add.cc.
References MaskLayer::act_point, MaskLayer::act_spline, ELEM, ListBase::first, MASKPOINT_ISSEL_ANY, MaskSpline::next, MaskSpline::points, MaskLayer::splines, and MaskSpline::tot_point.
Referenced by add_vertex_extrude().
| void MASK_OT_add_feather_vertex | ( | wmOperatorType * | ot | ) |
Definition at line 679 of file mask_add.cc.
References add_feather_vertex_exec(), add_feather_vertex_invoke(), wmOperatorType::description, ED_maskedit_mask_poll(), wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_float_vector(), and wmOperatorType::srna.
Referenced by ED_operatortypes_mask().
| void MASK_OT_add_vertex | ( | wmOperatorType * | ot | ) |
Definition at line 582 of file mask_add.cc.
References add_vertex_exec(), add_vertex_invoke(), wmOperatorType::description, ED_maskedit_visible_splines_poll(), wmOperatorType::exec, wmOperatorType::flag, FLT_MAX, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_float_vector(), and wmOperatorType::srna.
Referenced by ED_operatortypes_mask().
| void MASK_OT_primitive_circle_add | ( | wmOperatorType * | ot | ) |
Definition at line 863 of file mask_add.cc.
References define_primitive_add_properties(), wmOperatorType::description, ED_maskedit_visible_splines_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, primitive_add_invoke(), and primitive_circle_add_exec().
Referenced by ED_operatortypes_mask().
| void MASK_OT_primitive_square_add | ( | wmOperatorType * | ot | ) |
Definition at line 898 of file mask_add.cc.
References define_primitive_add_properties(), wmOperatorType::description, ED_maskedit_visible_splines_poll(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, primitive_add_invoke(), and primitive_square_add_exec().
Referenced by ED_operatortypes_mask().
|
static |
Definition at line 440 of file mask_add.cc.
References CTX_wm_area(), CTX_wm_region(), and ED_mask_pixelspace_factor().
Referenced by add_vertex_handle_cyclic_at_point().
|
static |
Definition at line 225 of file mask_add.cc.
References MEM_freeN().
Referenced by add_vertex_extrude(), and add_vertex_subdivide().
|
static |
Definition at line 713 of file mask_add.cc.
References add_v2_v2(), BKE_nurb_handle_calc(), copy_v2_v2(), BezTriple::h1, BezTriple::h2, and mul_v2_fl().
Referenced by create_primitive_from_points().
|
static |
Definition at line 814 of file mask_add.cc.
References CTX_wm_area(), ED_mask_cursor_location_get(), ED_mask_get_size(), wmOperatorType::exec, wmOperator::ptr, RNA_float_set_array(), and wmOperator::type.
Referenced by MASK_OT_primitive_circle_add(), and MASK_OT_primitive_square_add().
|
static |
Definition at line 853 of file mask_add.cc.
References ARRAY_SIZE, create_primitive_from_points(), HD_AUTO, and OPERATOR_FINISHED.
Referenced by MASK_OT_primitive_circle_add().
|
static |
Definition at line 888 of file mask_add.cc.
References ARRAY_SIZE, create_primitive_from_points(), HD_VECT, and OPERATOR_FINISHED.
Referenced by MASK_OT_primitive_square_add().
|
static |
Definition at line 41 of file mask_add.cc.
References MaskSplinePoint::bezt, BKE_mask_calc_handle_adjacent_interp(), BKE_mask_parent_init(), BKE_mask_point_parent_matrix_get(), copy_v2_v2(), copy_v3_v3(), ED_mask_select_flush_all(), BezTriple::h1, BezTriple::h2, HD_ALIGN, HD_VECT, MaskParent::id, int, invert_m3(), len_squared_v2v2(), MASK_SPLINE_CYCLIC, MASKPOINT_SEL_ALL, mod_i(), mul_m3_v2(), MaskSplinePoint::parent, and BezTriple::vec.
Referenced by add_vertex_extrude(), add_vertex_new(), and add_vertex_subdivide().