diff options
-rw-r--r-- | source/blender/src/editarmature.c | 2 | ||||
-rw-r--r-- | source/blender/src/outliner.c | 6 | ||||
-rw-r--r-- | source/blender/src/poseobject.c | 2 | ||||
-rw-r--r-- | source/blender/src/sculptmode.c | 17 |
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]) |