Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2008-06-09 22:41:16 +0400
committerMartin Poirier <theeth@yahoo.com>2008-06-09 22:41:16 +0400
commitfd1faa55425db3097e7bc6ae533dcca564a677cb (patch)
tree94f02d06d5a29a5df955611178c773b867d619d7 /source/blender/src/header_view3d.c
parent8c68895741c75960e879ffde7231c10ee5e0373c (diff)
Merge from Apricot Revisions 14897, 14913, 14914, 14915, 14929, 15009, 15046
--------------------------------------------------- Snappy stuff * Align rotation with snapping target: rotate the object, aligning it with the target (object mode only - temporarily) (New icon in the header when snap is turned on) * Snap to different mesh elements (face, edge, vertice): snapping target slide on faces and edge or use exact position of vertice. When using Align rotation with edge snapping, the normal is interpolated as you slide along. Snaps correctly to derived mesh (sculpt, modifiers, ...) and duplis. In object and edit mode. NOTE: The snapping code is now based on faces, so even if you're snapping to vertices or edges, it will not work on meshes without faces. This might change if needed.
Diffstat (limited to 'source/blender/src/header_view3d.c')
-rw-r--r--source/blender/src/header_view3d.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c
index 82fcdd23c1f..1ada2729289 100644
--- a/source/blender/src/header_view3d.c
+++ b/source/blender/src/header_view3d.c
@@ -5071,6 +5071,18 @@ static char *ndof_pup(void)
}
+static char *snapmode_pup(void)
+{
+ static char string[512];
+ char *str = string;
+
+ str += sprintf(str, "%s", "Snap Mode: %t");
+ str += sprintf(str, "%s", "|Vertex%x0");
+ str += sprintf(str, "%s", "|Edge%x1");
+ str += sprintf(str, "%s", "|Face%x2");
+ return string;
+}
+
static char *propfalloff_pup(void)
{
static char string[512];
@@ -5698,6 +5710,10 @@ void view3d_buttons(void)
if (G.scene->snap_flag & SCE_SNAP) {
uiDefIconButBitS(block, TOG, SCE_SNAP, B_REDR, ICON_SNAP_GEO,xco,0,XIC,YIC, &G.scene->snap_flag, 0, 0, 0, 0, "Use Snap or Grid (Shift Tab)");
xco+= XIC;
+ uiDefIconButBitS(block, TOG, SCE_SNAP_ROTATE, B_REDR, ICON_SNAP_NORMAL,xco,0,XIC,YIC, &G.scene->snap_flag, 0, 0, 0, 0, "Align rotation with the snapping target");
+ xco+= XIC;
+ uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_VERTEXSEL, snapmode_pup(), xco,0,XIC+10,YIC, &(G.scene->snap_mode), 0.0, 0.0, 0, 0, "Snapping mode");
+ xco+= XIC;
uiDefButS(block, MENU, B_NOP, "Mode%t|Closest%x0|Center%x1|Median%x2|Active%x3",xco,0,70,YIC, &G.scene->snap_target, 0, 0, 0, 0, "Snap Target Mode");
xco+= 70;
} else {