forked from bartvdbraak/blender
Proper fix for camera transform with snap.
Please email me or report a bug when such problem arise, it's simpler if done properly the first time.
This commit is contained in:
parent
589e641f97
commit
ca982d2a23
@ -245,7 +245,7 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo
|
|||||||
Mat3MulVecfl(t->con.pmtx, out);
|
Mat3MulVecfl(t->con.pmtx, out);
|
||||||
|
|
||||||
// With snap, a projection is alright, no need to correct for view alignment
|
// With snap, a projection is alright, no need to correct for view alignment
|
||||||
if (((t->tsnap.status & SNAP_ON) && (G.qual & LR_CTRLKEY)) == 0 ) {
|
if ((t->tsnap.status & SNAP_ON) == 0) {
|
||||||
if (getConstraintSpaceDimension(t) == 2) {
|
if (getConstraintSpaceDimension(t) == 2) {
|
||||||
if (out[0] != 0.0f || out[1] != 0.0f || out[2] != 0.0f) {
|
if (out[0] != 0.0f || out[1] != 0.0f || out[2] != 0.0f) {
|
||||||
planeProjection(t, in, out);
|
planeProjection(t, in, out);
|
||||||
|
@ -231,7 +231,8 @@ void initSnapping(TransInfo *t)
|
|||||||
{
|
{
|
||||||
resetSnapping(t);
|
resetSnapping(t);
|
||||||
|
|
||||||
if (t->spacetype == SPACE_VIEW3D || t->spacetype == SPACE_IMAGE) { // Only 3D view or UV
|
if ((t->spacetype == SPACE_VIEW3D || t->spacetype == SPACE_IMAGE) && // Only 3D view or UV
|
||||||
|
(t->flag & T_CAMERA) == 0) { // Not with camera selected
|
||||||
setSnappingCallback(t);
|
setSnappingCallback(t);
|
||||||
|
|
||||||
/* Edit mode */
|
/* Edit mode */
|
||||||
|
Loading…
Reference in New Issue
Block a user