Fix snap mixed with vertices ignored for meshes with vertices only
The logic assumed that there were only 3 basic snapping modes.
This commit is contained in:
parent
06888a8970
commit
063c9938f1
|
@ -2231,16 +2231,11 @@ static short snapMesh(SnapObjectContext *sctx,
|
|||
int *r_index)
|
||||
{
|
||||
BLI_assert(snapdata->snap_to_flag != SCE_SNAP_MODE_FACE);
|
||||
|
||||
if ((snapdata->snap_to_flag & ~SCE_SNAP_MODE_FACE) == SCE_SNAP_MODE_VERTEX) {
|
||||
if (me->totvert == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (me->totvert == 0) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
if (me->totedge == 0) {
|
||||
return 0;
|
||||
}
|
||||
else if (me->totedge == 0 && !(snapdata->snap_to_flag & SCE_SNAP_MODE_VERTEX)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
float lpmat[4][4];
|
||||
|
|
Loading…
Reference in New Issue