Commit: dc800154b619de64d2de7dae5f81154af343ccd2 Author: Campbell Barton Date: Wed Mar 20 15:45:10 2019 +1100 Branches: master https://developer.blender.org/rBdc800154b619de64d2de7dae5f81154af343ccd2
3D View: snap cursor to world origin now resets rotation =================================================================== M source/blender/editors/space_view3d/view3d_snap.c =================================================================== diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 755f14aea2f..862fc78649f 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -40,6 +40,7 @@ #include "BKE_mball.h" #include "BKE_object.h" #include "BKE_report.h" +#include "BKE_scene.h" #include "BKE_tracking.h" #include "DEG_depsgraph.h" @@ -800,12 +801,15 @@ void VIEW3D_OT_snap_cursor_to_active(wmOperatorType *ot) /* **************************************************** */ -/** Snaps the 3D cursor location to the origin. */ +/** Snaps the 3D cursor location to the origin and clears cursor rotation. */ static int snap_curs_to_center_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); + float mat3[3][3]; + unit_m3(mat3); zero_v3(scene->cursor.location); + BKE_scene_cursor_mat3_to_rot(&scene->cursor, mat3, false); DEG_id_tag_update(&scene->id, ID_RECALC_COPY_ON_WRITE); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs