New icon and button for Peel Object option for volume snapping.

Use snap point to get default embedding depth (for overlapping volumes).
This commit is contained in:
Martin Poirier 2009-03-17 21:26:09 +00:00
parent 772e5fbfb0
commit c5bc4e4fb1
6 changed files with 2166 additions and 2143 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

@ -294,7 +294,7 @@ typedef enum {
ICON_SNAP_GEAR,
ICON_SNAP_GEO,
ICON_SNAP_NORMAL,
ICON_BLANK42,
ICON_SNAP_PEEL_OBJECT,
ICON_SMOOTHCURVE,
ICON_SPHERECURVE,

@ -73,8 +73,8 @@ typedef struct TransSnap {
short modePoint;
short modeTarget;
int status;
float snapPoint[3];
float snapTarget[3];
float snapPoint[3]; /* snapping from this point */
float snapTarget[3];/* to this point */
float snapNormal[3];
float snapTangent[3];
float dist; // Distance from snapPoint to snapTarget

File diff suppressed because it is too large Load Diff

@ -5856,6 +5856,11 @@ void view3d_buttons(void)
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;
if (G.scene->snap_mode == SCE_SNAP_MODE_VOLUME)
{
uiDefIconButBitS(block, TOG, SCE_SNAP_PEEL_OBJECT, B_REDR, ICON_SNAP_PEEL_OBJECT,xco,0,XIC,YIC, &G.scene->snap_flag, 0, 0, 0, 0, "Consider objects as whole when finding volume center");
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, "Snap 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");

@ -505,14 +505,14 @@ void CalcSnapGeometry(TransInfo *t, float *vec)
peelObjects(&depth_peels, mval);
// if (stk->nb_points > 0 && stk->points[stk->nb_points - 1].type == PT_CONTINUOUS)
// {
// last_p = stk->points[stk->nb_points - 1].p;
// }
// else if (LAST_SNAP_POINT_VALID)
// if (LAST_SNAP_POINT_VALID)
// {
// last_p = LAST_SNAP_POINT;
// }
// else
// {
last_p = t->tsnap.snapPoint;
// }
for (p1 = depth_peels.first; p1; p1 = p1->next)