diff options
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_snap.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_snap.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 969591b1946..128597d4d5f 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -107,8 +107,8 @@ static void special_transvert_update(Scene *scene, Object *obedit) if(obedit) { - DAG_object_flush_update(scene, obedit, OB_RECALC_DATA); - + DAG_id_flush_update(obedit->data, OB_RECALC_DATA); + if(obedit->type==OB_MESH) { Mesh *me= obedit->data; BM_Compute_Normals(me->edit_btmesh->bm); // does face centers too @@ -542,7 +542,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *op) /* auto-keyframing */ // XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0); - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); + DAG_id_flush_update(ob->data, OB_RECALC_DATA); } else { ob->recalc |= OB_RECALC_OB; @@ -668,7 +668,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *op) /* auto-keyframing */ // XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0); - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); + DAG_id_flush_update(ob->data, OB_RECALC_DATA); } else { ob->recalc |= OB_RECALC_OB; @@ -1056,7 +1056,7 @@ static int snap_selected_to_center(bContext *C, wmOperator *op) /* auto-keyframing */ ob->pose->flag |= POSE_DO_UNLOCK; // XXX autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0); - DAG_object_flush_update(scene, ob, OB_RECALC_DATA); + DAG_id_flush_update(ob->data, OB_RECALC_DATA); } else { ob->recalc |= OB_RECALC_OB; @@ -1144,13 +1144,13 @@ static int snap_menu_invoke(bContext *C, wmOperator *unused, wmEvent *event) uiPopupMenu *pup= uiPupMenuBegin(C, "Snap", 0); uiLayout *layout= uiPupMenuLayout(pup); - uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_grid"); - uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_cursor"); - uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_center"); + uiItemO(layout, "Selected to Grid", 0, "VIEW3D_OT_snap_selected_to_grid"); + uiItemO(layout, "Selected to Cursor", 0, "VIEW3D_OT_snap_selected_to_cursor"); + uiItemO(layout, "Selected to Center", 0, "VIEW3D_OT_snap_selected_to_center"); uiItemS(layout); - uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_selected"); - uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_grid"); - uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_active"); + uiItemO(layout, "Cursor to Selected", 0, "VIEW3D_OT_snap_cursor_to_selected"); + uiItemO(layout, "Cursor to Grid", 0, "VIEW3D_OT_snap_cursor_to_grid"); + uiItemO(layout, "Cursor to Active", 0, "VIEW3D_OT_snap_cursor_to_active"); uiPupMenuEnd(C, pup); |