Blender
V3.3
|
#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_lasso_2d.h"
#include "BLI_math_vector.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "DNA_gpencil_types.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "BKE_context.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_curve.h"
#include "BKE_gpencil_geom.h"
#include "BKE_material.h"
#include "BKE_report.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "UI_view2d.h"
#include "ED_gpencil.h"
#include "ED_select_utils.h"
#include "ED_view3d.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "gpencil_intern.h"
Go to the source code of this file.
Classes | |
struct | GP_SelectUserData |
Select Grouped Operator | |
enum | eGP_SelectGrouped { GP_SEL_SAME_LAYER = 0 , GP_SEL_SAME_MATERIAL = 1 } |
typedef enum eGP_SelectGrouped | eGP_SelectGrouped |
static bool | gpencil_select_same_layer (bContext *C) |
static bool | gpencil_select_same_material (bContext *C) |
static int | gpencil_select_grouped_exec (bContext *C, wmOperator *op) |
void | GPENCIL_OT_select_grouped (wmOperatorType *ot) |
Generic Select Utility | |
typedef struct GP_SelectUserData | GP_SelectUserData |
typedef bool(* | GPencilTestFn) (ARegion *region, const float diff_mat[4][4], const float pt[3], GP_SelectUserData *user_data) |
static bool | gpencil_generic_curve_select (bContext *C, Object *ob, GPencilTestFn is_inside_fn, rcti UNUSED(box), GP_SelectUserData *user_data, const bool strokemode, const eSelectOp sel_op) |
static bool | gpencil_generic_stroke_select (bContext *C, Object *ob, bGPdata *gpd, GPencilTestFn is_inside_fn, rcti box, GP_SelectUserData *user_data, const bool strokemode, const bool segmentmode, const eSelectOp sel_op, const float scale, const bool is_curve_edit) |
static int | gpencil_generic_select_exec (bContext *C, wmOperator *op, GPencilTestFn is_inside_fn, rcti box, GP_SelectUserData *user_data) |
typedef enum eGP_SelectGrouped eGP_SelectGrouped |
typedef struct GP_SelectUserData GP_SelectUserData |
typedef bool(* GPencilTestFn) (ARegion *region, const float diff_mat[4][4], const float pt[3], GP_SelectUserData *user_data) |
Definition at line 1807 of file gpencil_select.c.
enum eGP_SelectGrouped |
Enumerator | |
---|---|
GP_SEL_SAME_LAYER | |
GP_SEL_SAME_MATERIAL |
Definition at line 739 of file gpencil_select.c.
Definition at line 142 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_DESEL_ALL, BKE_gpencil_stroke_select_index_reset(), C, CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, bGPDcurve::curve_points, Object::data, bGPDspoint::flag, bGPDcurve_point::flag, bGPDcurve::flag, GP_CURVE_POINT_SELECT, GP_CURVE_SELECT, GP_SPOINT_SELECT, GP_STROKE_SELECT, NULL, bGPdata::select_last_index, and bGPDcurve::tot_curve_points.
Referenced by gpencil_select_exec().
|
static |
Definition at line 120 of file gpencil_select.c.
References copy_v2_v2_int(), ED_view3d_project_int_global(), ELEM, mul_v3_m4v3(), V2D_IS_CLIPPED, V3D_PROJ_RET_CLIP_BB, V3D_PROJ_RET_CLIP_WIN, and V3D_PROJ_RET_OK.
Referenced by gpencil_select_curve_point(), gpencil_test_box(), and gpencil_test_lasso().
|
static |
Definition at line 2251 of file gpencil_select.c.
References C, data, gpencil_generic_select_exec(), gpencil_test_box(), and WM_operator_properties_border_to_rcti().
Referenced by GPENCIL_OT_select_box().
|
static |
Definition at line 1662 of file gpencil_select.c.
References blender::compositor::area(), BKE_report(), bool, C, CTX_data_active_object(), CTX_data_tool_settings(), CTX_wm_area(), wmOperator::customdata, DEG_id_tag_update(), ED_gpencil_data_get_active(), ED_gpencil_select_curve_toggle_all(), ED_gpencil_select_toggle_all(), ED_select_op_modal(), GP_EDITABLE_CURVES_BEGIN, GP_EDITABLE_CURVES_END, GP_EVALUATED_STROKES_BEGIN, GP_EVALUATED_STROKES_END, ToolSettings::gp_sculpt, GPENCIL_CURVE_EDIT_SESSIONS_ON, gpencil_do_curve_circle_sel(), GPENCIL_NONE_EDIT_MODE, gpencil_point_conversion_init(), gpencil_select_mode_from_sculpt(), gpencil_select_mode_from_vertex(), ToolSettings::gpencil_selectmode_edit, ToolSettings::gpencil_selectmode_sculpt, ToolSettings::gpencil_selectmode_vertex, gpencil_stroke_do_circle_sel(), bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, GP_Sculpt_Settings::isect_threshold, Object::mode, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OB_MODE_SCULPT_GPENCIL, OB_MODE_VERTEX_GPENCIL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RNA_int_get(), RPT_ERROR, SEL_DESELECT, SEL_OP_SUB, SEL_OP_USE_PRE_DESELECT, select(), WM_event_add_notifier(), WM_gesture_is_modal_first(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by GPENCIL_OT_select_circle().
|
static |
Definition at line 1568 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_DESEL_ALL, BEZT_DESEL_IDX, BEZT_ISSEL_ANY, BEZT_SEL_ALL, BEZT_SEL_IDX, BKE_gpencil_curve_sync_selection(), BLI_rcti_isect_pt(), C, CTX_data_active_object(), CTX_wm_region(), CTX_wm_view3d(), CURVE_HANDLE_NONE, CURVE_HANDLE_SELECTED, bGPDcurve::curve_points, Object::data, ED_view3d_project_int_global(), ELEM, bGPDcurve_point::flag, from, GP_CURVE_POINT_SELECT, GP_SELECTMODE_STROKE, View3DOverlay::handle_display, BezTriple::hide, mul_v3_m4v3(), View3D::overlay, select(), bGPDcurve::tot_curve_points, V2D_IS_CLIPPED, V3D_PROJ_RET_CLIP_BB, V3D_PROJ_RET_CLIP_WIN, V3D_PROJ_RET_OK, and BezTriple::vec.
Referenced by gpencil_circle_select_exec().
|
static |
Definition at line 1876 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_DESEL_ALL, BEZT_DESEL_IDX, BEZT_ISSEL_IDX, BEZT_SEL_ALL, BEZT_SEL_IDX, BKE_gpencil_curve_sync_selection(), BKE_gpencil_material_settings(), C, CTX_wm_region(), CTX_wm_view3d(), CURVE_HANDLE_ALL, CURVE_HANDLE_SELECTED, Object::data, ED_select_op_action_deselected(), BezTriple::f2, bGPDcurve_point::flag, MaterialGPencilStyle::flag, GP_CURVE_POINT_SELECT, GP_CURVE_SELECT, GP_EDITABLE_CURVES_BEGIN, GP_EDITABLE_CURVES_END, GP_MATERIAL_FILL_SHOW, View3DOverlay::handle_display, BezTriple::hide, is_inside(), View3D::overlay, SEL_OP_USE_PRE_DESELECT, SELECT, user_data, and BezTriple::vec.
Referenced by gpencil_generic_select_exec().
|
static |
Definition at line 2155 of file gpencil_select.c.
References blender::compositor::area(), BKE_report(), bool, C, CTX_data_active_object(), CTX_data_tool_settings(), CTX_wm_area(), DEG_id_tag_update(), ED_gpencil_data_get_active(), bGPdata::flag, GP_DATA_STROKE_PAINTMODE, ToolSettings::gp_sculpt, GP_SELECTMODE_SEGMENT, GP_SELECTMODE_STROKE, GPENCIL_CURVE_EDIT_SESSIONS_ON, gpencil_delete_selected_point_wrap(), gpencil_generic_curve_select(), gpencil_generic_stroke_select(), GPENCIL_PAINT_MODE, gpencil_select_mode_from_sculpt(), gpencil_select_mode_from_vertex(), ToolSettings::gpencil_selectmode_edit, ToolSettings::gpencil_selectmode_sculpt, ToolSettings::gpencil_selectmode_vertex, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, GP_Sculpt_Settings::isect_threshold, Object::mode, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OB_MODE_SCULPT_GPENCIL, OB_MODE_VERTEX_GPENCIL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, user_data, and WM_event_add_notifier().
Referenced by gpencil_box_select_exec(), and gpencil_lasso_select_exec().
|
static |
Definition at line 2025 of file gpencil_select.c.
References BKE_gpencil_material_settings(), BKE_gpencil_stroke_editcurve_update(), BKE_gpencil_stroke_geometry_update(), BKE_gpencil_stroke_select_check(), BKE_gpencil_stroke_select_index_reset(), BKE_gpencil_stroke_sync_selection(), bool, C, CTX_DATA_BEGIN, CTX_DATA_END, ED_gpencil_select_stroke_segment(), ED_gpencil_stroke_point_is_inside(), ED_select_op_action_deselected(), bGPDstroke::editcurve, bGPDspoint::flag, bGPDstroke::flag, MaterialGPencilStyle::flag, GP_EVALUATED_STROKES_BEGIN, GP_EVALUATED_STROKES_END, GP_MATERIAL_FILL_SHOW, GP_SPOINT_SELECT, GP_STROKE_NEEDS_CURVE_UPDATE, GP_STROKE_SELECT, GPENCIL_PAINT_MODE, gpencil_point_conversion_init(), bGPDstroke_Runtime::gps_orig, if(), is_inside(), NULL, bGPDspoint_Runtime::pt_orig, GP_SpaceConversion::region, bGPDspoint::runtime, bGPDstroke::runtime, SEL_OP_USE_PRE_DESELECT, select_all_curve_points(), bGPdata::select_last_index, SET_FLAG_FROM_TEST, user_data, bGPDspoint::x, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by gpencil_generic_select_exec().
|
static |
Definition at line 2303 of file gpencil_select.c.
References BLI_lasso_boundbox(), C, data, gpencil_generic_select_exec(), gpencil_test_lasso(), MEM_freeN, NULL, OPERATOR_PASS_THROUGH, GP_SelectUserData::rect, ret, and WM_gesture_lasso_path_to_array().
Referenced by GPENCIL_OT_select_lasso().
void GPENCIL_OT_select | ( | wmOperatorType * | ot | ) |
Definition at line 2672 of file gpencil_select.c.
References wmOperatorType::description, ED_select_pick_get_name(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::get_name, gpencil_select_exec(), gpencil_select_invoke(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_int_vector(), RNA_def_property_flag(), wmOperatorType::srna, and WM_operator_properties_mouse_select().
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 293 of file gpencil_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_select_all_exec(), gpencil_select_all_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and WM_operator_properties_select_all().
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_alternate | ( | wmOperatorType * | ot | ) |
Definition at line 499 of file gpencil_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_select_alternate_exec(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_box | ( | wmOperatorType * | ot | ) |
Definition at line 2259 of file gpencil_select.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_box_select_exec(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, WM_gesture_box_cancel(), WM_gesture_box_invoke(), WM_gesture_box_modal(), WM_operator_properties_gesture_box(), and WM_operator_properties_select_operation().
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_circle | ( | wmOperatorType * | ot | ) |
Definition at line 1768 of file gpencil_select.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_circle_select_exec(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, WM_gesture_circle_cancel(), WM_gesture_circle_invoke(), WM_gesture_circle_modal(), WM_operator_properties_gesture_circle(), and WM_operator_properties_select_operation_simple().
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_first | ( | wmOperatorType * | ot | ) |
Definition at line 1038 of file gpencil_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_select_first_exec(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_grouped | ( | wmOperatorType * | ot | ) |
Definition at line 930 of file gpencil_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, GP_SEL_SAME_LAYER, GP_SEL_SAME_MATERIAL, gpencil_select_grouped_exec(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, prop_select_grouped_types, RNA_def_enum(), wmOperatorType::srna, and WM_menu_invoke().
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_lasso | ( | wmOperatorType * | ot | ) |
Definition at line 2324 of file gpencil_select.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_lasso_select_exec(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_DEPENDS_ON_CURSOR, OPTYPE_UNDO, ot, wmOperatorType::poll, WM_gesture_lasso_cancel(), WM_gesture_lasso_invoke(), WM_gesture_lasso_modal(), WM_operator_properties_gesture_lasso(), and WM_operator_properties_select_operation().
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_last | ( | wmOperatorType * | ot | ) |
Definition at line 1148 of file gpencil_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_select_last_exec(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_less | ( | wmOperatorType * | ot | ) |
Definition at line 1446 of file gpencil_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_select_less_exec(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 371 of file gpencil_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_select_linked_exec(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 1300 of file gpencil_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_select_more_exec(), gpencil_select_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, and wmOperatorType::poll.
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_random | ( | wmOperatorType * | ot | ) |
Definition at line 710 of file gpencil_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_select_poll(), gpencil_select_random_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), wmOperatorType::srna, and WM_operator_properties_select_random().
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_select_vertex_color | ( | wmOperatorType * | ot | ) |
Definition at line 2863 of file gpencil_select.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_select_vertex_color_exec(), gpencil_select_vertex_color_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_int(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_gpencil().
|
static |
Definition at line 251 of file gpencil_select.c.
References BKE_report(), bool, C, CTX_data_tool_settings(), DEG_id_tag_update(), ED_gpencil_data_get_active(), ED_gpencil_select_curve_toggle_all(), ED_gpencil_select_toggle_all(), GPENCIL_ANY_SCULPT_MASK, GPENCIL_CURVE_EDIT_SESSIONS_ON, GPENCIL_NONE_EDIT_MODE, GPENCIL_SCULPT_MODE, ToolSettings::gpencil_selectmode_sculpt, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_ERROR, SEL_DESELECT, and WM_event_add_notifier().
Referenced by GPENCIL_OT_select_all().
Definition at line 236 of file gpencil_select.c.
References C, ED_gpencil_data_get_active(), ListBase::first, GPENCIL_ANY_MODE, and bGPdata::layers.
Referenced by GPENCIL_OT_select_all().
|
static |
Definition at line 392 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_DESEL_ALL, BEZT_SEL_ALL, BKE_gpencil_curve_sync_selection(), BKE_report(), bool, C, CTX_DATA_BEGIN, CTX_DATA_END, DEG_id_tag_update(), ED_gpencil_data_get_active(), bGPDspoint::flag, bGPDcurve_point::flag, GP_EDITABLE_CURVES_BEGIN, GP_EDITABLE_CURVES_END, GP_SPOINT_SELECT, GP_STROKE_SELECT, GPENCIL_CURVE_EDIT_SESSIONS_ON, GPENCIL_NONE_EDIT_MODE, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_select_alternate().
|
static |
Definition at line 2350 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_ISSEL_ANY, C, CTX_wm_region(), CTX_wm_view3d(), CURVE_HANDLE_NONE, CURVE_HANDLE_SELECTED, from, GP_EDITABLE_CURVES_BEGIN, GP_EDITABLE_CURVES_END, gpencil_3d_point_to_screen_space(), View3DOverlay::handle_display, BezTriple::hide, len_manhattan_v2v2_int(), View3D::overlay, and BezTriple::vec.
Referenced by gpencil_select_exec().
|
static |
Definition at line 2402 of file gpencil_select.c.
References blender::compositor::area(), bGPDcurve_point::bezt, BEZT_DESEL_IDX, BEZT_ISSEL_ANY, BEZT_SEL_IDX, BKE_gpencil_curve_sync_selection(), BKE_gpencil_stroke_editcurve_update(), BKE_gpencil_stroke_geometry_update(), BKE_gpencil_stroke_select_index_reset(), BKE_gpencil_stroke_select_index_set(), BKE_gpencil_stroke_sync_selection(), BKE_report(), bool, C, CTX_data_active_object(), CTX_data_tool_settings(), CTX_wm_area(), DEG_id_tag_update(), deselect_all_selected(), ED_gpencil_data_get_active(), ED_gpencil_select_stroke_segment(), bGPDstroke::editcurve, ELEM, BezTriple::f1, BezTriple::f2, BezTriple::f3, bGPDspoint::flag, bGPDcurve_point::flag, bGPDcurve::flag, bGPDstroke::flag, GP_CURVE_POINT_SELECT, GP_CURVE_SELECT, GP_EVALUATED_STROKES_BEGIN, GP_EVALUATED_STROKES_END, ToolSettings::gp_sculpt, GP_SELECTMODE_SEGMENT, GP_SELECTMODE_STROKE, GP_SPOINT_SELECT, GP_STROKE_NEEDS_CURVE_UPDATE, GP_STROKE_SELECT, GPENCIL_CURVE_EDIT_SESSIONS_ON, gpencil_point_conversion_init(), gpencil_point_to_parent_space(), gpencil_point_to_xy(), gpencil_select_curve_point(), gpencil_select_mode_from_sculpt(), gpencil_select_mode_from_vertex(), ToolSettings::gpencil_selectmode_edit, ToolSettings::gpencil_selectmode_sculpt, ToolSettings::gpencil_selectmode_vertex, bGPDstroke_Runtime::gps_orig, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, GP_Sculpt_Settings::isect_threshold, len_manhattan_v2v2_int(), Object::mode, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OB_MODE_SCULPT_GPENCIL, OB_MODE_VERTEX_GPENCIL, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, bGPDstroke::points, bGPDspoint_Runtime::pt_orig, wmOperator::ptr, GP_SelectUserData::radius, wmOperator::reports, RNA_boolean_get(), RNA_int_get_array(), RPT_ERROR, bGPDspoint::runtime, bGPDstroke::runtime, SELECT, select_all_curve_points(), V2D_IS_CLIPPED, WM_event_add_notifier(), and xy.
Referenced by GPENCIL_OT_select(), and gpencil_select_invoke().
|
static |
Definition at line 962 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_DESEL_ALL, BEZT_SEL_ALL, BKE_gpencil_stroke_select_index_set(), BLI_assert, bool, C, CTX_DATA_BEGIN, CTX_DATA_END, bGPDcurve::curve_points, DEG_id_tag_update(), ED_gpencil_data_get_active(), bGPDspoint::flag, bGPDcurve_point::flag, bGPDcurve::flag, GP_CURVE_POINT_SELECT, GP_CURVE_SELECT, GP_SPOINT_SELECT, GP_STROKE_SELECT, GPENCIL_CURVE_EDIT_SESSIONS_ON, GPENCIL_NONE_EDIT_MODE, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), bGPDcurve::tot_curve_points, and WM_event_add_notifier().
Referenced by GPENCIL_OT_select_first().
|
static |
Definition at line 893 of file gpencil_select.c.
References BLI_assert_msg, C, DEG_id_tag_update(), ED_gpencil_data_get_active(), GP_SEL_SAME_LAYER, GP_SEL_SAME_MATERIAL, GPENCIL_NONE_EDIT_MODE, gpencil_select_same_layer(), gpencil_select_same_material(), bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by GPENCIL_OT_select_grouped().
|
static |
Definition at line 2659 of file gpencil_select.c.
References C, gpencil_select_exec(), KM_SHIFT, wmEvent::modifier, wmEvent::mval, wmOperator::ptr, RNA_boolean_set(), RNA_int_set_array(), RNA_struct_property_is_set(), and WM_operator_flag_only_pass_through_on_press().
Referenced by GPENCIL_OT_select().
|
static |
Definition at line 1072 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_DESEL_ALL, BEZT_SEL_ALL, BKE_gpencil_stroke_select_index_set(), BLI_assert, bool, C, CTX_DATA_BEGIN, CTX_DATA_END, bGPDcurve::curve_points, DEG_id_tag_update(), ED_gpencil_data_get_active(), bGPDspoint::flag, bGPDcurve_point::flag, bGPDcurve::flag, GP_CURVE_POINT_SELECT, GP_CURVE_SELECT, GP_SPOINT_SELECT, GP_STROKE_SELECT, GPENCIL_CURVE_EDIT_SESSIONS_ON, GPENCIL_NONE_EDIT_MODE, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), bGPDcurve::tot_curve_points, and WM_event_add_notifier().
Referenced by GPENCIL_OT_select_last().
|
static |
Definition at line 1321 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_DESEL_ALL, bool, C, CTX_DATA_BEGIN, CTX_DATA_END, bGPDcurve::curve_points, DEG_id_tag_update(), ED_gpencil_data_get_active(), bGPDspoint::flag, bGPDcurve_point::flag, GP_CURVE_POINT_SELECT, GP_EDITABLE_STROKES_BEGIN, GP_EDITABLE_STROKES_END, GP_SPOINT_SELECT, GP_STROKE_SELECT, GPENCIL_CURVE_EDIT_SESSIONS_ON, GPENCIL_NONE_EDIT_MODE, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, bGPDcurve::tot_curve_points, and WM_event_add_notifier().
Referenced by GPENCIL_OT_select_less().
|
static |
Definition at line 316 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_SEL_ALL, BKE_report(), bool, C, CTX_DATA_BEGIN, CTX_DATA_END, DEG_id_tag_update(), ED_gpencil_data_get_active(), bGPDspoint::flag, bGPDcurve_point::flag, GP_CURVE_POINT_SELECT, GP_CURVE_SELECT, GP_EDITABLE_CURVES_BEGIN, GP_EDITABLE_CURVES_END, GP_SPOINT_SELECT, GP_STROKE_SELECT, GPENCIL_CURVE_EDIT_SESSIONS_ON, GPENCIL_NONE_EDIT_MODE, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, and WM_event_add_notifier().
Referenced by GPENCIL_OT_select_linked().
|
static |
Definition at line 62 of file gpencil_select.c.
References GP_SCULPT_MASK_SELECTMODE_POINT, GP_SCULPT_MASK_SELECTMODE_SEGMENT, GP_SCULPT_MASK_SELECTMODE_STROKE, GP_SELECTMODE_POINT, GP_SELECTMODE_SEGMENT, and GP_SELECTMODE_STROKE.
Referenced by gpencil_circle_select_exec(), gpencil_generic_select_exec(), gpencil_select_exec(), and gpencil_select_random_exec().
|
static |
Definition at line 77 of file gpencil_select.c.
References GP_SELECTMODE_POINT, GP_SELECTMODE_SEGMENT, GP_SELECTMODE_STROKE, GP_VERTEX_MASK_SELECTMODE_POINT, GP_VERTEX_MASK_SELECTMODE_SEGMENT, and GP_VERTEX_MASK_SELECTMODE_STROKE.
Referenced by gpencil_circle_select_exec(), gpencil_generic_select_exec(), gpencil_select_exec(), gpencil_select_random_exec(), and gpencil_select_vertex_color_exec().
|
static |
Definition at line 1182 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_SEL_ALL, bool, C, CTX_DATA_BEGIN, CTX_DATA_END, bGPDcurve::curve_points, DEG_id_tag_update(), ED_gpencil_data_get_active(), bGPDspoint::flag, bGPDcurve_point::flag, GP_CURVE_POINT_SELECT, GP_EDITABLE_STROKES_BEGIN, GP_EDITABLE_STROKES_END, GP_SPOINT_SELECT, GP_STROKE_SELECT, GPENCIL_CURVE_EDIT_SESSIONS_ON, GPENCIL_NONE_EDIT_MODE, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, bGPDcurve::tot_curve_points, and WM_event_add_notifier().
Referenced by GPENCIL_OT_select_more().
Definition at line 91 of file gpencil_select.c.
References C, CTX_data_tool_settings(), ED_gpencil_data_get_active(), ListBase::first, GPENCIL_ANY_MODE, GPENCIL_ANY_SCULPT_MASK, GPENCIL_ANY_VERTEX_MASK, GPENCIL_SCULPT_MODE, ToolSettings::gpencil_selectmode_sculpt, ToolSettings::gpencil_selectmode_vertex, GPENCIL_VERTEX_MODE, and bGPdata::layers.
Referenced by GPENCIL_OT_select(), GPENCIL_OT_select_alternate(), GPENCIL_OT_select_box(), GPENCIL_OT_select_circle(), GPENCIL_OT_select_first(), GPENCIL_OT_select_grouped(), GPENCIL_OT_select_lasso(), GPENCIL_OT_select_last(), GPENCIL_OT_select_less(), GPENCIL_OT_select_linked(), GPENCIL_OT_select_more(), and GPENCIL_OT_select_random().
|
static |
Definition at line 527 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_DESEL_ALL, BEZT_SEL_ALL, BKE_gpencil_curve_sync_selection(), BKE_gpencil_stroke_sync_selection(), BLI_array_randomize(), BLI_rng_free(), BLI_rng_get_uint(), BLI_rng_new(), bool, C, CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_tool_settings(), DEG_id_tag_update(), ED_gpencil_data_get_active(), bGPDspoint::flag, bGPDcurve_point::flag, GP_EDITABLE_CURVES_BEGIN, GP_EDITABLE_CURVES_END, GP_SELECTMODE_STROKE, GP_SPOINT_SELECT, GP_STROKE_SELECT, GPENCIL_CURVE_EDIT_SESSIONS_ON, GPENCIL_NONE_EDIT_MODE, gpencil_select_mode_from_sculpt(), gpencil_select_mode_from_vertex(), ToolSettings::gpencil_selectmode_edit, ToolSettings::gpencil_selectmode_sculpt, ToolSettings::gpencil_selectmode_vertex, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, MEM_freeN, MEM_mallocN, Object::mode, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OB_MODE_SCULPT_GPENCIL, OB_MODE_VERTEX_GPENCIL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), RNA_float_get(), seed, SEL_SELECT, select(), select_all_curve_points(), select_all_stroke_points(), WM_event_add_notifier(), and WM_operator_properties_select_random_seed_increment_get().
Referenced by GPENCIL_OT_select_random().
Definition at line 754 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_SEL_ALL, BKE_gpencil_layer_frame_get(), BKE_gpencil_stroke_select_index_set(), bool, C, RenderData::cfra, CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_scene(), bGPDcurve::curve_points, ED_gpencil_data_get_active(), ED_gpencil_stroke_can_use(), bGPDstroke::editcurve, ListBase::first, bGPDspoint::flag, bGPDcurve_point::flag, bGPDcurve::flag, bGPDstroke::flag, GP_CURVE_POINT_SELECT, GP_CURVE_SELECT, GP_GETFRAME_USE_PREV, GP_SPOINT_SELECT, GP_STROKE_SELECT, GPENCIL_CURVE_EDIT_SESSIONS_ON, bGPDstroke::next, NULL, bGPDstroke::points, Scene::r, scene, bGPDframe::strokes, and bGPDcurve::tot_curve_points.
Referenced by gpencil_select_grouped_exec().
Definition at line 824 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_SEL_ALL, BKE_gpencil_stroke_select_index_set(), BLI_gset_add(), BLI_gset_free(), BLI_gset_haskey(), BLI_gset_int_new(), bool, C, CTX_DATA_BEGIN, CTX_DATA_END, bGPDcurve::curve_points, ED_gpencil_data_get_active(), bGPDspoint::flag, bGPDcurve_point::flag, bGPDcurve::flag, GP_CURVE_POINT_SELECT, GP_CURVE_SELECT, GP_SPOINT_SELECT, GP_STROKE_SELECT, GPENCIL_CURVE_EDIT_SESSIONS_ON, NULL, POINTER_FROM_INT, and bGPDcurve::tot_curve_points.
Referenced by gpencil_select_grouped_exec().
|
static |
Definition at line 2783 of file gpencil_select.c.
References BKE_gpencil_stroke_select_index_set(), BKE_report(), BLI_ghash_free(), BLI_ghash_haskey(), BLI_ghash_int_new(), BLI_ghash_len(), C, CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, CTX_data_tool_settings(), DEG_id_tag_update(), ED_gpencil_data_get_active(), bGPDspoint::flag, GP_SELECTMODE_STROKE, GP_SPOINT_SELECT, GP_STROKE_SELECT, gpencil_select_mode_from_vertex(), gpencil_selected_hue_table(), ToolSettings::gpencil_selectmode_vertex, bGPdata::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, NA_SELECTED, NC_GEOM, NC_GPENCIL, ND_SELECT, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, POINTER_FROM_INT, pow(), wmOperator::ptr, wmOperator::reports, rgb_to_hsv_compat_v(), RNA_int_get(), RPT_ERROR, threshold, bGPDspoint::vert_color, and WM_event_add_notifier().
Referenced by GPENCIL_OT_select_vertex_color().
Definition at line 2760 of file gpencil_select.c.
References C, CTX_data_active_object(), CTX_data_tool_settings(), Object::data, ListBase::first, GPENCIL_ANY_VERTEX_MASK, ToolSettings::gpencil_selectmode_vertex, GPENCIL_VERTEX_MODE, if(), bGPdata::layers, NULL, OB_GPENCIL, and Object::type.
Referenced by GPENCIL_OT_select_vertex_color().
|
static |
Definition at line 2718 of file gpencil_select.c.
References BLI_ghash_haskey(), BLI_ghash_insert(), C, CTX_DATA_BEGIN, CTX_DATA_END, ED_gpencil_stroke_can_use(), ED_gpencil_stroke_material_editable(), bGPDspoint::flag, GP_SPOINT_SELECT, GP_STROKE_SELECT, LISTBASE_FOREACH, POINTER_FROM_INT, pow(), rgb_to_hsv_compat_v(), threshold, and bGPDspoint::vert_color.
Referenced by gpencil_select_vertex_color_exec().
|
static |
Helper to check if a given stroke is within the area.
Definition at line 1474 of file gpencil_select.c.
References BKE_gpencil_stroke_editcurve_update(), BKE_gpencil_stroke_geometry_update(), BKE_gpencil_stroke_select_index_reset(), BKE_gpencil_stroke_select_index_set(), BKE_gpencil_stroke_sync_selection(), BLI_rcti_isect_pt(), bool, ED_gpencil_select_stroke_segment(), bGPDstroke::editcurve, ELEM, bGPDstroke::flag, GP_SELECTMODE_SEGMENT, GP_SELECTMODE_STROKE, GP_SPOINT_SELECT, GP_STROKE_NEEDS_CURVE_UPDATE, GP_STROKE_SELECT, gpencil_point_to_parent_space(), gpencil_point_to_xy(), bGPDstroke_Runtime::gps_orig, if(), NULL, bGPDstroke::points, bGPDspoint_Runtime::pt_orig, bGPDspoint::runtime, bGPDstroke::runtime, select(), select_all_curve_points(), and V2D_IS_CLIPPED.
Referenced by gpencil_circle_select_exec().
|
static |
Definition at line 2239 of file gpencil_select.c.
References BLI_rcti_isect_pt(), gpencil_3d_point_to_screen_space(), and user_data.
Referenced by gpencil_box_select_exec().
|
static |
Definition at line 2288 of file gpencil_select.c.
References BLI_lasso_is_point_inside(), BLI_rcti_isect_pt(), gpencil_3d_point_to_screen_space(), and user_data.
Referenced by gpencil_lasso_select_exec().
|
static |
Definition at line 203 of file gpencil_select.c.
References bGPDcurve_point::bezt, BEZT_DESEL_ALL, BEZT_SEL_ALL, BKE_gpencil_stroke_select_index_reset(), BKE_gpencil_stroke_select_index_set(), bGPDcurve::curve_points, bGPDcurve_point::flag, bGPDcurve::flag, bGPDstroke::flag, GP_CURVE_POINT_SELECT, GP_CURVE_SELECT, GP_STROKE_SELECT, and bGPDcurve::tot_curve_points.
Referenced by gpencil_generic_stroke_select(), gpencil_select_exec(), gpencil_select_random_exec(), and gpencil_stroke_do_circle_sel().
|
static |
Definition at line 181 of file gpencil_select.c.
References BKE_gpencil_stroke_select_index_reset(), BKE_gpencil_stroke_select_index_set(), bGPDspoint::flag, bGPDstroke::flag, GP_SPOINT_SELECT, GP_STROKE_SELECT, bGPDstroke::points, select(), and bGPDstroke::totpoints.
Referenced by gpencil_select_random_exec().