* Brought back axis locking
* Fixed flipping stroke add/sub with shift key at start of stroke
* Fixed a crash in stroke exec
This commit is contained in:
Nicholas Bishop 2009-01-30 20:35:37 +00:00
parent a7b0df894e
commit 1e1c193092
3 changed files with 20 additions and 17 deletions

View File

@ -275,11 +275,12 @@ static void sculpt_clip(StrokeCache *cache, float *co, const float val[3])
static void sculpt_axislock(Sculpt *sd, float *co)
{
if (sd->flags & (SCULPT_LOCK_X|SCULPT_LOCK_Y|SCULPT_LOCK_Z)) return;
/* XXX: if(G.vd->twmode == V3D_MANIP_LOCAL) { */
if(0) {
if(sd->flags == (SCULPT_LOCK_X|SCULPT_LOCK_Y|SCULPT_LOCK_Z))
return;
if(sd->session->cache->vc.v3d->twmode == V3D_MANIP_LOCAL) {
float mat[3][3], imat[3][3];
/* XXX: Mat3CpyMat4(mat, OBACT->obmat); */
Mat3CpyMat4(mat, sd->session->cache->vc.obact->obmat);
Mat3Inv(imat, mat);
Mat3MulVecfl(mat, co);
if (sd->flags & SCULPT_LOCK_X) co[0] = 0.0;
@ -1576,9 +1577,8 @@ static int sculpt_brush_stroke_exec(bContext *C, wmOperator *op)
}
RNA_END;
sculpt_cache_free(sd->session->cache);
sculpt_flush_update(C);
sculpt_cache_free(sd->session->cache);
sculpt_undo_push(C, sd);

View File

@ -99,7 +99,8 @@ void view3d_keymap(wmWindowManager *wm)
WM_keymap_verify_item(keymap, "VIEW3D_OT_vpaint", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_wpaint", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "SCULPT_OT_brush_stroke", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
WM_keymap_verify_item(keymap, "VIEW3D_OT_cursor3d", ACTIONMOUSE, KM_PRESS, 0, 0);

View File

@ -812,16 +812,18 @@ typedef struct Scene {
#define FFMPEG_MULTIPLEX_AUDIO 1
#define FFMPEG_AUTOSPLIT_OUTPUT 2
/* SculptData.flags */
#define SCULPT_SYMM_X 1
#define SCULPT_SYMM_Y 2
#define SCULPT_SYMM_Z 4
#define SCULPT_INPUT_SMOOTH 8
#define SCULPT_DRAW_FAST 16
#define SCULPT_DRAW_BRUSH 32
#define SCULPT_LOCK_X 64
#define SCULPT_LOCK_Y 128
#define SCULPT_LOCK_Z 256
/* Sculpt.flags */
typedef enum SculptFlags {
SCULPT_SYMM_X = 1,
SCULPT_SYMM_Y = 2,
SCULPT_SYMM_Z = 4,
SCULPT_INPUT_SMOOTH = 8,
SCULPT_DRAW_FAST = 16,
SCULPT_DRAW_BRUSH = 32,
SCULPT_LOCK_X = 64,
SCULPT_LOCK_Y = 128,
SCULPT_LOCK_Z = 256
} SculptFlags;
/* toolsettings->imagepaint_flag */
#define IMAGEPAINT_DRAWING 1