Fix T89826: VSE snapping with constrained axis
Constraining to X axis caused snapping to not work at all. Constraining to Y axis caused snapping indicator to be drawn, when snapping doesn't occur. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11898
This commit is contained in:
parent
5583d51773
commit
2761679180
Notes:
blender-bot
2023-02-14 09:24:53 +01:00
Referenced by issue #89826, VSE's snap doesn't work when locking X axis
|
@ -129,7 +129,7 @@ static void applySeqSlide(TransInfo *t, const int UNUSED(mval[2]))
|
|||
transform_convert_sequencer_channel_clamp(t, values_final);
|
||||
|
||||
if (t->con.mode & CON_APPLY) {
|
||||
t->con.applyVec(t, NULL, NULL, t->values, values_final);
|
||||
t->con.applyVec(t, NULL, NULL, values_final, values_final);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -236,6 +236,11 @@ void transform_snap_sequencer_data_free(TransSeqSnapData *data)
|
|||
|
||||
bool transform_snap_sequencer_calc(TransInfo *t)
|
||||
{
|
||||
/* Prevent snapping when constrained to Y axis. */
|
||||
if (t->con.mode & CON_APPLY && t->con.mode & CON_AXIS1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const TransSeqSnapData *snap_data = t->tsnap.seq_context;
|
||||
int best_dist = MAXFRAME, best_target_frame = 0, best_source_frame = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue