diff options
author | Johnny Matthews <johnny.matthews@gmail.com> | 2021-11-30 16:21:14 +0300 |
---|---|---|
committer | Johnny Matthews <johnny.matthews@gmail.com> | 2021-11-30 16:21:14 +0300 |
commit | 1cd9fcd98d5f1f11d2c20a35ae19142e5458068c (patch) | |
tree | 7600f6bc0084c126ca2359aaef3f1e6a1acc9677 /source/blender/blenloader/intern/versioning_300.c | |
parent | 2f7bec04e8e7e423f11767535b469cdeb5062b14 (diff) |
Geometry Nodes: Rename Curve Parameter, Add Index on Spline
- Rename the Curve Parameter node to Spline Parameter.
- Add "Index on Spline" to the node. This output is the index of
the current point on it's parent spline rather than the entrire curve.
Differential Revision: https://developer.blender.org/D13275
Diffstat (limited to 'source/blender/blenloader/intern/versioning_300.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 068541a5825..295084cd62f 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -2404,6 +2404,19 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain) * \note Keep this message at the bottom of the function. */ { + LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) { + if (ntree->type != NTREE_GEOMETRY) { + continue; + } + version_node_id(ntree, GEO_NODE_CURVE_SPLINE_PARAMETER, "GeometryNodeSplineParameter"); + LISTBASE_FOREACH (bNode *, node, &ntree->nodes) { + if (node->type == GEO_NODE_CURVE_SPLINE_PARAMETER) { + version_node_add_socket_if_not_exist( + ntree, node, SOCK_OUT, SOCK_INT, PROP_NONE, "Index", "Index"); + } + } + } + /* Keep this block, even when empty. */ } } |