Fix alignment test when snap to edge while in vert or edge slide
This commit is contained in:
parent
b6f35531b6
commit
52b125a790
Notes:
blender-bot
2023-02-14 11:25:11 +01:00
Referenced by issue #78529, Blend file corrupted during save caused by high Cubemap Size Referenced by issue #78527, GPencil: Mirror is inconsistent with Mesh Mirror Referenced by issue #78384, Mantaflow - liquid sim - strange behaviour
|
@ -1316,6 +1316,7 @@ static void edge_slide_snap_apply(TransInfo *t, float *value)
|
|||
if (t->tsnap.snapElem & (SCE_SNAP_MODE_EDGE | SCE_SNAP_MODE_FACE)) {
|
||||
float co_dir[3];
|
||||
sub_v3_v3v3(co_dir, co_dest[side_index], co_orig);
|
||||
normalize_v3(co_dir);
|
||||
if (t->tsnap.snapElem & SCE_SNAP_MODE_EDGE) {
|
||||
transform_constraint_snap_axis_to_edge(t, co_dir, dvec);
|
||||
}
|
||||
|
|
|
@ -556,13 +556,14 @@ static void vert_slide_snap_apply(TransInfo *t, float *value)
|
|||
getSnapPoint(t, dvec);
|
||||
sub_v3_v3(dvec, t->tsnap.snapTarget);
|
||||
if (t->tsnap.snapElem & (SCE_SNAP_MODE_EDGE | SCE_SNAP_MODE_FACE)) {
|
||||
float co_dir_3d[3];
|
||||
sub_v3_v3v3(co_dir_3d, co_curr_3d, co_orig_3d);
|
||||
float co_dir[3];
|
||||
sub_v3_v3v3(co_dir, co_curr_3d, co_orig_3d);
|
||||
normalize_v3(co_dir);
|
||||
if (t->tsnap.snapElem & SCE_SNAP_MODE_EDGE) {
|
||||
transform_constraint_snap_axis_to_edge(t, co_dir_3d, dvec);
|
||||
transform_constraint_snap_axis_to_edge(t, co_dir, dvec);
|
||||
}
|
||||
else {
|
||||
transform_constraint_snap_axis_to_face(t, co_dir_3d, dvec);
|
||||
transform_constraint_snap_axis_to_face(t, co_dir, dvec);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue