Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/curve/editcurve_select.c
| Context not available. | |||||
| static int select_nth_exec(bContext *C, wmOperator *op) | static int select_nth_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| Object *obedit = CTX_data_edit_object(C); | |||||
| struct CheckerIntervalParams op_params; | struct CheckerIntervalParams op_params; | ||||
| WM_operator_properties_checker_interval_from_op(op, &op_params); | WM_operator_properties_checker_interval_from_op(op, &op_params); | ||||
| if (!ed_curve_select_nth(obedit->data, &op_params)) { | ViewLayer *view_layer = CTX_data_view_layer(C); | ||||
| if (obedit->type == OB_SURF) { | uint objects_len = 0; | ||||
| BKE_report(op->reports, RPT_ERROR, "Surface has not got active point"); | 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++) | ||||
| else { | { | ||||
| BKE_report(op->reports, RPT_ERROR, "Curve has not got active point"); | Object *obedit = objects[ob_index]; | ||||
| if (!ed_curve_select_nth(obedit->data, &op_params)) { | |||||
| if (obedit->type == OB_SURF) { | |||||
| BKE_report(op->reports, RPT_ERROR, "Surface has not got active point"); | |||||
| } | |||||
| else { | |||||
| BKE_report(op->reports, RPT_ERROR, "Curve has not got active point"); | |||||
| } | |||||
| continue; | |||||
| } | } | ||||
| return OPERATOR_CANCELLED; | WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); | ||||
| } | } | ||||
| MEM_freeN(objects); | |||||
| WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); | |||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| Context not available. | |||||