Maniphest T18329

VRML import on indexedfaceset munges some colors (off by one)
Closed, Archived

Assigned To
Campbell Barton (campbellbarton)
Authored By
Ezra Peisach (epeisach)
Feb 26 2009, 3:19 AM
Tags
  • BF Blender
Subscribers
Campbell Barton (campbellbarton)

Description

Group: current SVN version
Resolution: Fixed
Category: Scripts

If one imports a VRML file with pervertexcolors - at the ends of the mesh - there are sometime some strange coloring. The failure is that there is an off by one. When the verticies are read in - they are numbered from 1.... instead of 0... as indicated in the VRML spec. This is tagged under EEKADOODLE.

The face list internally has one added to the vertex number (face,append(int(fi)+1).

My solution is to add an entry ifs_vcol list ([0,0,0,)] in asimilar manner to the bpymesh.verts.extend of a dummy vertex.

How to reproduce:

Import fig2.wrl.gz, delete duplicate duplicate verticies and look near the end of the coils. Attached are two figures - one with the broken and one with the fixed code.

Event Timeline

Ezra Peisach (epeisach) edited a custom field.Feb 26 2009, 3:19 AM
Ezra Peisach (epeisach) attached 1 file(s): F7912: brokencolor.jpg.
Ezra Peisach (epeisach) attached 1 file(s): F7914: fixedcolor.jpg.
Ezra Peisach (epeisach) attached 1 file(s): F7916: patch1.

Forgot to add the fig2.wrl.gz

Ezra Peisach (epeisach) attached 1 file(s): F7918: fig2.wrl.gz.Feb 26 2009, 3:21 AM
Ton Roosendaal (ton) added a comment.Apr 5 2009, 8:06 PM

Sorry, don't know for sure who coded the vrml script, but campbell fixed a lot in it already!

Campbell Barton (campbellbarton) added a comment.Apr 13 2009, 8:51 AM

thanks for the patch, applied to trunk.

Campbell Barton (campbellbarton) changed the task status from Unknown Status to Unknown Status.Apr 13 2009, 8:51 AM
Nobody (None) added a comment.Feb 26 2009, 3:19 AM

This task was automatically closed as archived as part of migration, because the project or tracker this task belonged to is no longer active.