diff options
author | Aleksi Juvani <aleksijuvani> | 2022-04-07 01:30:56 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-07 01:30:56 +0300 |
commit | 81ec3dce6542f996e5d61017fab83bd721b61822 (patch) | |
tree | d6434658da8830faee00e4614aaa832704975d48 /source/blender/blenloader | |
parent | 181d577d7d97990bf1094710a09c377bad24a8eb (diff) |
Geometry Nodes: Add "Connected" mode to Merge by Distance node
Expose the "Connected" mode from the weld modifier in the
"Merge by Distance" geometry node. This method only merges
vertices along existing edges, but it can be much faster
because it doesn't have to build a KD Tree of all selected
points.
Differential Revision: https://developer.blender.org/D14321
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 5ba7dc74e3d..dd3412d6c83 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -2648,5 +2648,22 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) */ { /* Keep this block, even when empty. */ + + /* Add node storage for the merge by distance node. */ + FOREACH_NODETREE_BEGIN (bmain, ntree, id) { + if (ntree->type == NTREE_GEOMETRY) { + LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { + if (node->type == GEO_NODE_MERGE_BY_DISTANCE) { + if (node->storage == NULL) { + NodeGeometryMergeByDistance *data = MEM_callocN(sizeof(NodeGeometryMergeByDistance), + __func__); + data->mode = GEO_NODE_MERGE_BY_DISTANCE_MODE_ALL; + node->storage = data; + } + } + } + } + } + FOREACH_NODETREE_END; } } |