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:
authorHans Goudey <h.goudey@me.com>2021-01-26 21:57:31 +0300
committerHans Goudey <h.goudey@me.com>2021-01-26 21:57:31 +0300
commit1c4b0c47dd476c424b750edd4dadf977937fee85 (patch)
treea16236e0f97d267b4a183658484ea692b060be34 /source/blender/blenloader
parentde3f369b30e5d08415b8cff14e462ec6d18689ea (diff)
Geometry Nodes: Support all operations in the "Attribute Math" node
This adds the ability to use all the math operations in the regular utility "Math" node. The code is quite similar to the attribute vector math node, with the simplification that the result is always a float. Differential Revision: https://developer.blender.org/D10199
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/versioning_290.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c
index d1cbf05c0ba..b389c5ed210 100644
--- a/source/blender/blenloader/intern/versioning_290.c
+++ b/source/blender/blenloader/intern/versioning_290.c
@@ -1630,6 +1630,21 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain)
FOREACH_NODETREE_END;
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 293, 4)) {
+ /* Add support for all operations to the "Attribute Math" node. */
+ FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
+ if (ntree->type == NTREE_GEOMETRY) {
+ LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
+ if (node->type == GEO_NODE_ATTRIBUTE_MATH) {
+ NodeAttributeMath *data = (NodeAttributeMath *)node->storage;
+ data->input_type_c = GEO_NODE_ATTRIBUTE_INPUT_ATTRIBUTE;
+ }
+ }
+ }
+ }
+ FOREACH_NODETREE_END;
+ }
+
/**
* Versioning code until next subversion bump goes here.
*