Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/curve/editcurve.c
| Show First 20 Lines • Show All 1,282 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /******************** separate operator ***********************/ | /******************** separate operator ***********************/ | ||||
| static int separate_exec(bContext *C, wmOperator *op) | static int separate_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| SceneLayer *sl = CTX_data_scene_layer(C); | ViewLayer *sl = CTX_data_view_layer(C); | ||||
| Object *oldob, *newob; | Object *oldob, *newob; | ||||
| Base *oldbase, *newbase; | Base *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; | ||||
| ▲ Show 20 Lines • Show All 3,715 Lines • ▼ Show 20 Lines | if (vc.rv3d && !RNA_struct_property_is_set(op->ptr, "location")) { | ||||
| } | } | ||||
| ED_view3d_win_to_3d_int(vc.v3d, vc.ar, location, event->mval, location); | ED_view3d_win_to_3d_int(vc.v3d, vc.ar, location, event->mval, location); | ||||
| if (use_proj) { | if (use_proj) { | ||||
| const float mval[2] = {UNPACK2(event->mval)}; | const float mval[2] = {UNPACK2(event->mval)}; | ||||
| struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d( | struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d( | ||||
| CTX_data_main(C), vc.scene, vc.scene_layer, vc.engine, 0, | CTX_data_main(C), vc.scene, vc.view_layer, vc.engine, 0, | ||||
| vc.ar, vc.v3d); | vc.ar, vc.v3d); | ||||
| ED_transform_snap_object_project_view3d_mixed( | ED_transform_snap_object_project_view3d_mixed( | ||||
| snap_context, | snap_context, | ||||
| SCE_SELECT_FACE, | SCE_SELECT_FACE, | ||||
| &(const struct SnapObjectParams){ | &(const struct SnapObjectParams){ | ||||
| .snap_select = (vc.scene->obedit != NULL) ? SNAP_NOT_ACTIVE : SNAP_ALL, | .snap_select = (vc.scene->obedit != NULL) ? SNAP_NOT_ACTIVE : SNAP_ALL, | ||||
| .use_object_edit_cage = false, | .use_object_edit_cage = false, | ||||
| ▲ Show 20 Lines • Show All 1,380 Lines • Show Last 20 Lines | |||||