diff options
author | Hans Goudey <h.goudey@me.com> | 2021-10-26 19:25:44 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-10-26 19:25:44 +0300 |
commit | 8ddfdfd2b2a52f746312246aa3099ab0df8544a0 (patch) | |
tree | 5b228cb84c3587661a9c5b59878ebc6f99f07dd5 /source/blender/blenloader/intern/versioning_300.c | |
parent | 7979dff9dc7985cebb530c7490dc730d9c1acf1d (diff) |
Geometry Nodes: Handle multiple grids in the volume to mesh node
In future use cases, a volume can contain many grids that represent the
density information. In this case, it's better if the volume to mesh node
creates a mesh based on all of the grids in the volume.
This is also a benefit to share-ability, since one doesn't have to
specify the grid name in the node. Instead, in the future we can have
a way to split particular grids into separate volumes, if only one
grid should be considered.
The code changes are relatively simple:
- Move the old volume to mesh node to the legacy folder.
- Run the volume to mesh node on all instance geometry, like elsewhere.
- Make the blenkernel's volume to mesh API a bit more specific.
Differential Revision: https://developer.blender.org/D12997
Diffstat (limited to 'source/blender/blenloader/intern/versioning_300.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 57447db8723..d0d6c1471b7 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -967,7 +967,7 @@ static bool geometry_node_is_293_legacy(const short node_type) /* Maybe legacy: Special case for grid names? Or finish patch from level set branch to * generate a mesh for all grids in the volume. */ - case GEO_NODE_VOLUME_TO_MESH: + case GEO_NODE_LEGACY_VOLUME_TO_MESH: return false; /* Legacy: Transferred *all* attributes before, will not transfer all built-ins now. */ @@ -2098,6 +2098,7 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) } version_node_id(ntree, FN_NODE_SLICE_STRING, "FunctionNodeSliceString"); version_geometry_nodes_set_position_node_offset(ntree); + version_node_id(ntree, GEO_NODE_LEGACY_VOLUME_TO_MESH, "GeometryNodeLegacyVolumeToMesh"); } /* Keep this block, even when empty. */ |