Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/curve/editcurve.c
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_curve.h" | #include "BKE_curve.h" | ||||
| #include "BKE_depsgraph.h" | #include "BKE_depsgraph.h" | ||||
| #include "BKE_displist.h" | #include "BKE_displist.h" | ||||
| #include "BKE_fcurve.h" | #include "BKE_fcurve.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_key.h" | #include "BKE_key.h" | ||||
| #include "BKE_layer.h" | |||||
| #include "BKE_library.h" | #include "BKE_library.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_animsys.h" | #include "BKE_animsys.h" | ||||
| #include "BKE_action.h" | #include "BKE_action.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| ▲ Show 20 Lines • Show All 1,202 Lines • ▼ Show 20 Lines | void ED_curve_editnurb_free(Object *obedit) | ||||
| BKE_curve_editNurb_free(cu); | BKE_curve_editNurb_free(cu); | ||||
| } | } | ||||
| /******************** separate operator ***********************/ | /******************** separate operator ***********************/ | ||||
| static int separate_exec(bContext *C, wmOperator *op) | static int separate_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| #if 0 | |||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Object *oldob, *newob; | Object *oldob, *newob; | ||||
| Base *oldbase, *newbase; | ObjectBase *oldbase, *newbase; | ||||
| Curve *oldcu, *newcu; | Curve *oldcu, *newcu; | ||||
| EditNurb *newedit; | EditNurb *newedit; | ||||
| ListBase newnurb = {NULL, NULL}; | ListBase newnurb = {NULL, NULL}; | ||||
| oldbase = CTX_data_active_base(C); | oldbase = CTX_data_active_base(C); | ||||
| oldob = oldbase->object; | oldob = oldbase->object; | ||||
| oldcu = oldob->data; | oldcu = oldob->data; | ||||
| Show All 39 Lines | #if 0 | ||||
| DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ | DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */ | ||||
| WM_event_add_notifier(C, NC_GEOM | ND_DATA, oldob->data); | WM_event_add_notifier(C, NC_GEOM | ND_DATA, oldob->data); | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, newob); | WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, newob); | ||||
| WM_cursor_wait(0); | WM_cursor_wait(0); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| #else | |||||
| /* need to refactor this to use ObjectBase and create a new object in the correct SceneCollection */ | |||||
| TODO_LAYER_BASE | |||||
| (void)C; | |||||
| BKE_report(op->reports, RPT_ERROR, "CURVE_OT_separate not supported at the moment"); | |||||
| return OPERATOR_CANCELLED; | |||||
| #endif | |||||
| } | } | ||||
| void CURVE_OT_separate(wmOperatorType *ot) | void CURVE_OT_separate(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Separate"; | ot->name = "Separate"; | ||||
| ot->idname = "CURVE_OT_separate"; | ot->idname = "CURVE_OT_separate"; | ||||
| ot->description = "Separate selected points from connected unselected points into a new object"; | ot->description = "Separate selected points from connected unselected points into a new object"; | ||||
| ▲ Show 20 Lines • Show All 4,967 Lines • Show Last 20 Lines | |||||