[Bf-python] Mesh Face vert order.
Ken Hughes
khughes at pacific.edu
Sun Apr 9 02:11:29 CEST 2006
Campbell Barton wrote:
> Ken Hughes wrote:
>
>> Campbell Barton wrote:
>>
>>> Hi, just updating openflight import and export.
>>> and found a problem-
>>> The order of the verts in a face, once added. is changed from that of
>>> the original list.
>>> ....
>>
>>
>> Cam:
>>
>> This shouldn't happen, as there is code in MFaceSeq_extend which is
>> supposed to keep track of the original vertex order and assign the
>> verts to the faces in that order. Upload an example to the bug
>> tracker and I'll see what's going on.
>>
>> Ken
>
> Ken, did a double ckeck and it is definetly the order changing on
> creation. Though a script that created 100000 random faces did not show
> the error. so Im guessing it only happens with certain mesh connectivity
> situations.
>
> # Error is - showing the different order.
>
> (0, 3, 90, 95) [90, 95, 0, 3]
> ......
> self.blender_import_face(tri, material[0], material[1])
> File "/root/.blender/scripts/flt_import_mesh_new", line 860, in
> blender_impor t_face
> raise "Error"
> Error
Yeah, that should have tipped me off.... if vert 3 or 4 is index 0, then
it's reordered. This was to be consistent with zr's "eeekadoodle" rules
for faces with only 2 vertices, or at least as I understood them. If
vertex 0 is used in a face, is has to be one of the first two verts.
Now that he's around on IRC more, maybe he can explain if there's a
better way to handle this.
Ken
More information about the Bf-python
mailing list