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:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-01-30 23:35:37 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2009-01-30 23:35:37 +0300
commit1e1c1930920b48fe319f42118e46b003b80d01cf (patch)
tree8e7a0a24d472930e657967190d612e4e570ba840 /source/blender
parenta7b0df894ee5dbb6b0c3182f54b63587cdc0ce90 (diff)
Sculpt:
* Brought back axis locking * Fixed flipping stroke add/sub with shift key at start of stroke * Fixed a crash in stroke exec
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/sculpt/sculpt.c12
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c3
-rw-r--r--source/blender/makesdna/DNA_scene_types.h22
3 files changed, 20 insertions, 17 deletions
diff --git a/source/blender/editors/sculpt/sculpt.c b/source/blender/editors/sculpt/sculpt.c
index 974f5149391..be1fcc8fe8b 100644
--- a/source/blender/editors/sculpt/sculpt.c
+++ b/source/blender/editors/sculpt/sculpt.c
@@ -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);
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 81c87260af1..550b5f95efc 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -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);
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 9194e4d2632..ac3f7e69399 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -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