Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/curve/editcurve_select.c
| Show First 20 Lines • Show All 731 Lines • ▼ Show 20 Lines | void CURVE_OT_select_next(wmOperatorType *ot) | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| } | } | ||||
| /***************** select previous operator **********************/ | /***************** select previous operator **********************/ | ||||
| static int select_previous_exec(bContext *C, wmOperator *UNUSED(op)) | static int select_previous_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| { | { | ||||
| Object *obedit = CTX_data_edit_object(C); | ViewLayer *view_layer = CTX_data_view_layer(C); | ||||
| uint objects_len = 0; | |||||
| Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, &objects_len); | |||||
| for (uint ob_index = 0; ob_index < objects_len; ob_index++) { | |||||
| Object *obedit = objects[ob_index]; | |||||
| ListBase *editnurb = object_editcurve_get(obedit); | ListBase *editnurb = object_editcurve_get(obedit); | ||||
| select_adjacent_cp(editnurb, -1, 0, SELECT); | select_adjacent_cp(editnurb, -1, 0, SELECT); | ||||
| DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE); | DEG_id_tag_update(obedit->data, DEG_TAG_SELECT_UPDATE); | ||||
| WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); | WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); | ||||
| } | |||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void CURVE_OT_select_previous(wmOperatorType *ot) | void CURVE_OT_select_previous(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Select Previous"; | ot->name = "Select Previous"; | ||||
| ot->idname = "CURVE_OT_select_previous"; | ot->idname = "CURVE_OT_select_previous"; | ||||
| ▲ Show 20 Lines • Show All 1,041 Lines • Show Last 20 Lines | |||||