[Bf-python] Bug in NMesh.c

Jonas Petersen blenderjox at mindfloaters.de
Sat Oct 23 03:05:46 CEST 2004


There is a bug in the NMesh_hasFaceUV() function.

The set/unset code is swapped. This python code proofs the issue:

  mesh.hasFaceUV(False)
  print "hasFaceUV(False): ", mesh.hasFaceUV()
  mesh.hasFaceUV(True)
  print "hasFaceUV(True): ", mesh.hasFaceUV()

The output is:

  hasFaceUV(False):  True
  hasFaceUV(True):  False

This code (line 1061)...

    case 0:
        me->flags |= NMESH_HASFACEUV;
        break;
    case 1:
        me->flags &= ~NMESH_HASFACEUV;
        break;

...has to be replaced by:

    case 0:
        me->flags &= ~NMESH_HASFACEUV;
        break;
    case 1:
        me->flags |= NMESH_HASFACEUV;
        break;

(Like in NMesh_hasVertexColours())

Jonas



More information about the Bf-python mailing list