Fix T38631: Blender crashes when selection faces after new boolean modifier
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 14 Feb 2014 08:25:43 +0000 (14:25 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 14 Feb 2014 08:26:26 +0000 (14:26 +0600)
Own mistake in edges carve->blender export, didn't count them correct.

extern/carve/carve-capi.cc

index 7478c34166363ccce42f57e9b0f837ac40bb2a6a..aaf5761516c9ce56a9f2bb9c88bdb889ed071c37 100644 (file)
@@ -522,7 +522,6 @@ void carve_exportMesh(CarveMeshDescr *mesh_descr,
        std::unordered_map<VertexPair, int> edge_map;
        for (int i = 0, edge_index = 0; i < poly->meshes.size(); ++i) {
                carve::mesh::Mesh<3> *mesh = poly->meshes[i];
-
                // Export closed edges.
                exportMesh_handle_edges_list(poly,
                                             mesh->closed_edges,
@@ -531,6 +530,7 @@ void carve_exportMesh(CarveMeshDescr *mesh_descr,
                                             export_data,
                                             edge_origindex_map,
                                             &edge_map);
+               edge_index += mesh->closed_edges.size();
 
                // Export open edges.
                exportMesh_handle_edges_list(poly,
@@ -540,8 +540,7 @@ void carve_exportMesh(CarveMeshDescr *mesh_descr,
                                             export_data,
                                             edge_origindex_map,
                                             &edge_map);
-
-               edge_index += mesh->closed_edges.size();
+               edge_index += mesh->open_edges.size();
        }
 
        // Export all the loops and polys.