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-10-21 19:51:56 +0300
committerHans Goudey <h.goudey@me.com>2021-10-21 19:51:56 +0300
commit7b9319adf90e1742873213abbcd9293c3c4c3749 (patch)
treedc0ce3330edd66ea967d45f2f965f26b23530533 /source/blender/blenloader/intern
parentdeb7ec312a43d5a511b2862da8e31b2addb7f492 (diff)
Geometry Nodes: Update bounding box to work on individual instances
This commit makes the bounding box node work on each unique geometry (including instances) individually instead of making one large bounding box for everything. This makes the node much faster, and is often the desired result anyway. For the old behavior, a realize instances node can be used in front of this node (versioning adds it automatically). The min and max outputs now only output the values from the realized geometry. Differential Revision: https://developer.blender.org/D12951
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/versioning_300.c13
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 51a3e32f2bb..bdee5194c9a 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -754,6 +754,19 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports))
}
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 300, 37)) {
+ LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
+ if (ntree->type == NTREE_GEOMETRY) {
+ LISTBASE_FOREACH_MUTABLE (bNode *, node, &ntree->nodes) {
+ if (node->type == GEO_NODE_BOUNDING_BOX) {
+ bNodeSocket *geometry_socket = node->inputs.first;
+ add_realize_instances_before_socket(ntree, node, geometry_socket);
+ }
+ }
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*