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:
authorRay Molenkamp <github@lazydodo.com>2021-04-09 01:25:09 +0300
committerRay Molenkamp <github@lazydodo.com>2021-04-09 01:25:09 +0300
commit3d7e3d5ad0b4a6b790eb95076394948f5a0e046e (patch)
tree4bfdf4fb57baab6c55a6852bf9ff5fdb58561de5 /source/blender/nodes/geometry/nodes/node_geo_common.cc
parent500045a0d3b57f4333527cb710f05f666acaf904 (diff)
Fix: Missing GeometryNodeCustomGroup
This is a minor change to add some plumbing code to support custom geo nodes. This is working the same way as the custom cycles and compositor nodes. An example add-in is attached to D10784 Reviewed By: JacquesLucke Differential Revision: http://developer.blender.org/D10784
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_common.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_common.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_common.cc b/source/blender/nodes/geometry/nodes/node_geo_common.cc
index 441ad6bdc13..e2bb7e9f939 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_common.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_common.cc
@@ -43,3 +43,17 @@ void register_node_type_geo_group(void)
nodeRegisterType(&ntype);
}
+
+void register_node_type_geo_custom_group(bNodeType *ntype)
+{
+ /* These methods can be overridden but need a default implementation otherwise. */
+ if (ntype->poll == nullptr) {
+ ntype->poll = geo_node_poll_default;
+ }
+ if (ntype->insert_link == nullptr) {
+ ntype->insert_link = node_insert_link_default;
+ }
+ if (ntype->update_internal_links == nullptr) {
+ ntype->update_internal_links = node_update_internal_links_default;
+ }
+}