Fix T101040: Blender Crashes When snap roll a bone in armature

The modes that don't support individual projection shouldn't support
FACE_NEAREST either.

Differential Revision: https://developer.blender.org/D15970
This commit is contained in:
Germano Cavalcante 2022-09-16 09:03:08 -03:00 committed by Germano Cavalcante
parent 13c4af66fc
commit 4b326d5a78
Notes: blender-bot 2023-02-14 09:03:55 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
Referenced by issue #101040, Regression: Blender Crashes When snap roll a bone in armature
1 changed files with 2 additions and 6 deletions

View File

@ -125,15 +125,11 @@ bool activeSnap(const TransInfo *t)
bool activeSnap_SnappingIndividual(const TransInfo *t)
{
if (activeSnap(t) && t->tsnap.mode & SCE_SNAP_MODE_FACE_NEAREST) {
return true;
}
if (!t->tsnap.project) {
if (!activeSnap(t) || (t->flag & T_NO_PROJECT)) {
return false;
}
if (!activeSnap(t) || (t->flag & T_NO_PROJECT)) {
if (!(t->tsnap.project || (t->tsnap.mode & SCE_SNAP_MODE_FACE_NEAREST))) {
return false;
}