Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor-Louis De Gusseme <victorlouis>2021-02-27 00:23:09 +0300
committerHans Goudey <h.goudey@me.com>2021-02-27 00:23:09 +0300
commitf7933d0744df44c132f8b07b2cb2a8dea13fb30b (patch)
treefa28d36de0a67033569cc02fb0061f70209ead95 /source/blender/blenloader
parente00a87163cfd1b885afb4cb3ddff5f9fe911d2aa (diff)
Geometry Nodes: Add "Location" output to Attribute Proximity node
This patch adds an output field to the Attribute Proximity node and renames the existing string socket from "Result" to "Distance". - The "Distance" output contains distance to the closest position on the Target geometry. - The new "Location" output contains the coordinates of the closest position on the Target geometry. A basic use case for this data is a simple shrinkwrap operation. Differential Revision: https://developer.blender.org/D10415
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index 02de0b0ff08..b05d5ae7d26 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1722,16 +1722,7 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
FOREACH_NODETREE_END;
}
- /**
- * Versioning code until next subversion bump goes here.
- *
- * \note Be sure to check when bumping the version:
- * - "versioning_userdef.c", #blo_do_versions_userdef
- * - "versioning_userdef.c", #do_versions_theme
- *
- * \note Keep this message at the bottom of the function.
- */
- {
+ if (!MAIN_VERSION_ATLEAST(bmain, 293, 9)) {
if (!DNA_struct_elem_find(fd->filesdna, "SceneEEVEE", "float", "bokeh_overblur")) {
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
scene->eevee.bokeh_neighbor_max = 10.0f;
@@ -1753,6 +1744,24 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
+ FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
+ if (ntree->type == NTREE_GEOMETRY) {
+ version_node_socket_name(ntree, GEO_NODE_ATTRIBUTE_PROXIMITY, "Result", "Distance");
+ }
+ }
+ FOREACH_NODETREE_END;
+ }
+
+ /**
+ * Versioning code until next subversion bump goes here.
+ *
+ * \note Be sure to check when bumping the version:
+ * - "versioning_userdef.c", #blo_do_versions_userdef
+ * - "versioning_userdef.c", #do_versions_theme
+ *
+ * \note Keep this message at the bottom of the function.
+ */
+ {
/* Keep this block, even when empty. */
}
}