Fix T38562: Wrong curve tilt after Switch Direction
This commit is contained in:
parent
7fb7ce789f
commit
54dd355cc8
Notes:
blender-bot
2023-02-14 11:13:21 +01:00
Referenced by issue #38562, Wrong curve tilt after "Switch Direction"
|
@ -3519,6 +3519,9 @@ void BKE_nurb_direction_switch(Nurb *nu)
|
|||
bezt1->alfa = -bezt1->alfa;
|
||||
bezt2->alfa = -bezt2->alfa;
|
||||
}
|
||||
else {
|
||||
bezt1->alfa = -bezt1->alfa;
|
||||
}
|
||||
a--;
|
||||
bezt1++;
|
||||
bezt2--;
|
||||
|
@ -3537,6 +3540,12 @@ void BKE_nurb_direction_switch(Nurb *nu)
|
|||
bp1++;
|
||||
bp2--;
|
||||
}
|
||||
/* If there're odd number of points no need to touch coord of middle one,
|
||||
* but still need to change it's tilt.
|
||||
*/
|
||||
if (nu->pntsu & 1) {
|
||||
bp1->alfa = -bp1->alfa;
|
||||
}
|
||||
if (nu->type == CU_NURBS) {
|
||||
/* no knots for too short paths */
|
||||
if (nu->knotsu) {
|
||||
|
|
Loading…
Reference in New Issue