38 Object &curves_ob = *base->object;
49 std::optional<FindClosestData> new_closest_elem = closest_elem_find_screen_space(
51 curves.points_by_curve(),
56 bke::AttrDomain::Curve,
59 if (new_closest_elem) {
60 new_closest.elem = *new_closest_elem;
61 new_closest.curves_id = &curves_id;
87 if (selection_domain == bke::AttrDomain::Point) {
91 for (
const int point : points_by_curve[
closest.elem.index]) {
96 else if (selection_domain == bke::AttrDomain::Curve) {
117 params.deselect_all =
false;
118 params.select_passthrough =
false;
129 ot->
name =
"Select Linked";
130 ot->
idname =
"CURVES_OT_select_linked_pick";
131 ot->
description =
"Select all points in the curve under the cursor";
142 "Deselect linked control points rather than selecting them");
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
Low-level operations for curves.
blender::Vector< Base * > BKE_view_layer_array_from_bases_in_edit_mode_unique_data(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
void DEG_id_tag_update(ID *id, unsigned int flags)
ViewContext ED_view3d_viewcontext_init(bContext *C, Depsgraph *depsgraph)
blender::float4x4 ED_view3d_ob_project_mat_get(const RegionView3D *rv3d, const Object *ob)
bool closest(btVector3 &v)
constexpr Span slice(int64_t start, int64_t size) const
constexpr IndexRange index_range() const
OffsetIndices< int > points_by_curve() const
const Depsgraph * depsgraph
static wmOperatorStatus select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
GeometryDeformation get_evaluated_curves_deformation(const Object *ob_eval, const Object &ob_orig)
static bool select_linked_pick(bContext &C, const int2 &mval, const SelectPick_Params ¶ms)
void apply_selection_operation_at_index(GMutableSpan selection, const int index, const eSelectOp sel_op)
static ClosestCurveDataBlock find_closest_curve(const Depsgraph &depsgraph, const ViewContext &vc, const Span< Base * > bases, const int2 &mval)
void foreach_selectable_curve_range(const bke::CurvesGeometry &curves, const bke::crazyspace::GeometryDeformation &deformation, eHandleDisplay handle_display, SelectionRangeFn range_consumer)
bool editable_curves_poll(bContext *C)
void foreach_selection_attribute_writer(bke::CurvesGeometry &curves, bke::AttrDomain selection_domain, blender::FunctionRef< void(bke::GSpanAttributeWriter &selection)> fn)
bke::GSpanAttributeWriter ensure_selection_attribute(bke::CurvesGeometry &curves, bke::AttrDomain selection_domain, eCustomDataType create_type, StringRef attribute_name)
void CURVES_OT_select_linked_pick(wmOperatorType *ot)
Value parallel_reduce(IndexRange range, int64_t grain_size, const Value &identity, const Function &function, const Reduction &reduction)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
blender::ed::curves::FindClosestData elem
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
void WM_event_add_notifier(const bContext *C, uint type, void *reference)