Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_relations.c
| Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | static bool vertex_parent_set_poll(bContext *C) | ||||
| return ED_operator_editmesh(C) || ED_operator_editsurfcurve(C) || ED_operator_editlattice(C); | return ED_operator_editmesh(C) || ED_operator_editsurfcurve(C) || ED_operator_editlattice(C); | ||||
| } | } | ||||
| static int vertex_parent_set_exec(bContext *C, wmOperator *op) | static int vertex_parent_set_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); | ||||
| View3D *v3d = CTX_wm_view3d(C); | View3D *v3d = CTX_wm_view3d(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| ViewLayer *view_layer = CTX_data_view_layer(C); | ViewLayer *view_layer = CTX_data_view_layer(C); | ||||
| Object *obedit = CTX_data_edit_object(C); | Object *obedit = CTX_data_edit_object(C); | ||||
| BMVert *eve; | BMVert *eve; | ||||
| BMIter iter; | BMIter iter; | ||||
| Nurb *nu; | Nurb *nu; | ||||
| BezTriple *bezt; | BezTriple *bezt; | ||||
| BPoint *bp; | BPoint *bp; | ||||
| Object *par; | Object *par; | ||||
| ▲ Show 20 Lines • Show All 536 Lines • ▼ Show 20 Lines | bool ED_object_parent_set(ReportList *reports, | ||||
| Object *ob, | Object *ob, | ||||
| Object *par, | Object *par, | ||||
| int partype, | int partype, | ||||
| const bool xmirror, | const bool xmirror, | ||||
| const bool keep_transform, | const bool keep_transform, | ||||
| const int vert_par[3]) | const int vert_par[3]) | ||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| bPoseChannel *pchan = NULL; | bPoseChannel *pchan = NULL; | ||||
| bPoseChannel *pchan_eval = NULL; | bPoseChannel *pchan_eval = NULL; | ||||
| const bool pararm = ELEM( | const bool pararm = ELEM( | ||||
| partype, PAR_ARMATURE, PAR_ARMATURE_NAME, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_AUTO); | partype, PAR_ARMATURE, PAR_ARMATURE_NAME, PAR_ARMATURE_ENVELOPE, PAR_ARMATURE_AUTO); | ||||
| Object *parent_eval = DEG_get_evaluated_object(depsgraph, par); | Object *parent_eval = DEG_get_evaluated_object(depsgraph, par); | ||||
| DEG_id_tag_update(&par->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); | DEG_id_tag_update(&par->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); | ||||
| ▲ Show 20 Lines • Show All 2,058 Lines • Show Last 20 Lines | |||||