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:
authorCampbell Barton <ideasman42@gmail.com>2008-04-15 13:20:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-15 13:20:13 +0400
commit2147e74bc5974424f17abbd52d57f0f6a6d0861a (patch)
treeff64d518964ff612d07ec5276644d25caacf45d8 /source/blender
parent6bb327badc63d65afe459e092059bf1d9c20b075 (diff)
made sculpt axis locking use local/global space (using the transform space)
also added some checks for sculpt mixing with other modes (was possible to mix sculpt+posemode)
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/src/editarmature.c2
-rw-r--r--source/blender/src/outliner.c6
-rw-r--r--source/blender/src/poseobject.c2
-rw-r--r--source/blender/src/sculptmode.c17
4 files changed, 20 insertions, 7 deletions
diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c
index 811ea53396b..b074d29dd8d 100644
--- a/source/blender/src/editarmature.c
+++ b/source/blender/src/editarmature.c
@@ -1855,7 +1855,7 @@ void add_primitiveArmature(int type)
if ELEM(curarea->spacetype, SPACE_VIEW3D, SPACE_INFO); else return;
if (G.vd==NULL) return;
- G.f &= ~(G_VERTEXPAINT+G_TEXTUREPAINT+G_WEIGHTPAINT);
+ G.f &= ~(G_VERTEXPAINT+G_TEXTUREPAINT+G_WEIGHTPAINT+G_SCULPTMODE);
setcursor_space(SPACE_VIEW3D, CURSOR_STD);
check_editmode(OB_ARMATURE);
diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c
index b9c1725233f..d66118ae1fc 100644
--- a/source/blender/src/outliner.c
+++ b/source/blender/src/outliner.c
@@ -1302,6 +1302,8 @@ static int outliner_open_back(SpaceOops *soops, TreeElement *te)
return retval;
}
+/* This is not used anywhere at the moment */
+#if 0
static void outliner_open_reveal(SpaceOops *soops, ListBase *lb, TreeElement *teFind, int *found)
{
TreeElement *te;
@@ -1324,7 +1326,7 @@ static void outliner_open_reveal(SpaceOops *soops, ListBase *lb, TreeElement *te
}
}
}
-
+#endif
void outliner_one_level(struct ScrArea *sa, int add)
{
@@ -2652,7 +2654,7 @@ static void object_delete_cb(TreeElement *te, TreeStoreElem *tsep, TreeStoreElem
if(G.obedit==base->object) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR);
if(base==BASACT) {
- G.f &= ~(G_VERTEXPAINT+G_TEXTUREPAINT+G_WEIGHTPAINT);
+ G.f &= ~(G_VERTEXPAINT+G_TEXTUREPAINT+G_WEIGHTPAINT+G_SCULPTMODE);
setcursor_space(SPACE_VIEW3D, CURSOR_STD);
}
diff --git a/source/blender/src/poseobject.c b/source/blender/src/poseobject.c
index 0eb4d0bb9a1..4c97a8fdbdf 100644
--- a/source/blender/src/poseobject.c
+++ b/source/blender/src/poseobject.c
@@ -121,7 +121,7 @@ void enter_posemode(void)
}
if (G.obedit) exit_editmode(EM_FREEDATA|EM_WAITCURSOR);
- G.f &= ~(G_VERTEXPAINT | G_TEXTUREPAINT | G_WEIGHTPAINT);
+ G.f &= ~(G_VERTEXPAINT | G_TEXTUREPAINT | G_WEIGHTPAINT | G_SCULPTMODE);
}
void set_pose_keys (Object *ob)
diff --git a/source/blender/src/sculptmode.c b/source/blender/src/sculptmode.c
index 3b46d79513c..9e358d5df0c 100644
--- a/source/blender/src/sculptmode.c
+++ b/source/blender/src/sculptmode.c
@@ -422,9 +422,20 @@ void sculpt_axislock(float *co)
{
SculptData *sd = sculpt_data();
if (sd->axislock == AXISLOCK_X+AXISLOCK_Y+AXISLOCK_Z) return;
- if (sd->axislock & AXISLOCK_X) co[0] = 0.0;
- if (sd->axislock & AXISLOCK_Y) co[1] = 0.0;
- if (sd->axislock & AXISLOCK_Z) co[2] = 0.0;
+ if (G.vd->twmode == V3D_MANIP_LOCAL) {
+ float mat[3][3], imat[3][3];
+ Mat3CpyMat4(mat, OBACT->obmat);
+ Mat3Inv(imat, mat);
+ Mat3MulVecfl(mat, co);
+ if (sd->axislock & AXISLOCK_X) co[0] = 0.0;
+ if (sd->axislock & AXISLOCK_Y) co[1] = 0.0;
+ if (sd->axislock & AXISLOCK_Z) co[2] = 0.0;
+ Mat3MulVecfl(imat, co);
+ } else {
+ if (sd->axislock & AXISLOCK_X) co[0] = 0.0;
+ if (sd->axislock & AXISLOCK_Y) co[1] = 0.0;
+ if (sd->axislock & AXISLOCK_Z) co[2] = 0.0;
+ }
}
static void add_norm_if(const BrushAction *a, float out[3], float out_flip[3], const short no[3])