Skip to content
Snippets Groups Projects
  • Bastien Montagne's avatar
    c307a89e
    OBJ Importer: Rework/cleanup of mesh generation code. · c307a89e
    Bastien Montagne authored
    That code was doing some rather crazy things, like:
    * tessellating ngons, and un-tesselate them later;
    * use up to two bmesh transformations for each imported mesh;
    * ...
    
    Now, removed the 'use_ngons' option and all the tesselated mess,
    we always only work in polygon context, user can triangulate later if really needed.
    
    Got rid of all bmesh stuff.
    
    Also, some cleanup of 'old' fashioned code, like e.g. converting dict views to list
    before iterating on those...
    
    With pure-tessellated .obj, we gain nearly nothing (about 5% quicker - and much nicer code).
    
    With .obj containing a fair amount of ngons, we devide import time by six!
    E.g. with a test mesh of 475000 polygons (1100000 triangles), we go from 60 seconds (old code)
    to less than 10 seconds with new code!
    c307a89e
    History
    OBJ Importer: Rework/cleanup of mesh generation code.
    Bastien Montagne authored
    That code was doing some rather crazy things, like:
    * tessellating ngons, and un-tesselate them later;
    * use up to two bmesh transformations for each imported mesh;
    * ...
    
    Now, removed the 'use_ngons' option and all the tesselated mess,
    we always only work in polygon context, user can triangulate later if really needed.
    
    Got rid of all bmesh stuff.
    
    Also, some cleanup of 'old' fashioned code, like e.g. converting dict views to list
    before iterating on those...
    
    With pure-tessellated .obj, we gain nearly nothing (about 5% quicker - and much nicer code).
    
    With .obj containing a fair amount of ngons, we devide import time by six!
    E.g. with a test mesh of 475000 polygons (1100000 triangles), we go from 60 seconds (old code)
    to less than 10 seconds with new code!