42 Object &curves_ob = *base->object;
43 Curves &curves_id = *id_cast<Curves *>(curves_ob.
data);
53 std::optional<FindClosestData> new_closest_elem = closest_elem_find_screen_space(
55 curves.points_by_curve(),
60 bke::AttrDomain::Curve,
63 if (new_closest_elem) {
64 new_closest.elem = *new_closest_elem;
65 new_closest.curves_id = &curves_id;
95 for (
const int point : points_by_curve[
closest.elem.index]) {
133 ot->
name =
"Select Linked";
134 ot->
idname =
"CURVES_OT_select_linked_pick";
135 ot->
description =
"Select all points in the curve under the cursor";
146 "Deselect linked control points rather than selecting them");
Low-level operations for curves.
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
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)
static wmOperatorStatus select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void foreach_selectable_curve_range(const bke::CurvesGeometry &curves, const bke::crazyspace::GeometryDeformation &deformation, eHandleDisplay handle_display, SelectionRangeFn range_consumer)
void foreach_selection_attribute_writer(bke::CurvesGeometry &curves, bke::AttrDomain selection_domain, FunctionRef< void(bke::GSpanAttributeWriter &selection)> fn)
bool editable_curves_poll(bContext *C)
bke::GSpanAttributeWriter ensure_selection_attribute(bke::CurvesGeometry &curves, bke::AttrDomain selection_domain, bke::AttrType 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)
ViewContext ED_view3d_viewcontext_init(bContext *C, Depsgraph *depsgraph)
float4x4 ED_view3d_ob_project_mat_get(const RegionView3D *rv3d, const Object *ob)
MatBase< float, 4, 4 > float4x4
VecBase< int32_t, 2 > int2
void DEG_id_tag_update(ID *id, unsigned int flags)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C, bool rna_write_check=false)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
Vector< Base * > BKE_view_layer_array_from_bases_in_edit_mode_unique_data(const Main &bmain, const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
ed::curves::FindClosestData elem
eHandleDisplay handle_display
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT