diff options
Diffstat (limited to 'source/blender/nodes/geometry/node_geometry_util.hh')
-rw-r--r-- | source/blender/nodes/geometry/node_geometry_util.hh | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/source/blender/nodes/geometry/node_geometry_util.hh b/source/blender/nodes/geometry/node_geometry_util.hh index e7d9d9639bd..85716fb0c4f 100644 --- a/source/blender/nodes/geometry/node_geometry_util.hh +++ b/source/blender/nodes/geometry/node_geometry_util.hh @@ -45,35 +45,13 @@ bool geo_node_poll_default(struct bNodeType *ntype, namespace blender::nodes { -namespace detail { -DECL_NODE_FUNC_OPTIONAL(build_multi_function) -DECL_NODE_FUNC_OPTIONAL(geometry_node_execute) -DECL_NODE_FIELD_OPTIONAL(geometry_node_execute_supports_laziness, false); -} // namespace detail - -template<typename T> struct GeometryNodeDefinition : public NodeDefinition<T> { - static const int ui_icon = ICON_NONE; - static const short node_class = NODE_CLASS_GEOMETRY; - inline static const StructRNA *rna_base = &RNA_GeometryNode; - - static bool poll(bNodeType *ntype, bNodeTree *ntree, const char **r_disabled_hint) - { - return geo_node_poll_default(ntype, ntree, r_disabled_hint); - } - - /* Registers a node type using static fields and callbacks of the template argument. */ - static void register_type() - { - NodeDefinition<T>::typeinfo_.build_multi_function = - detail::node_type_get__build_multi_function<T>(); - NodeDefinition<T>::typeinfo_.geometry_node_execute = - detail::node_type_get__geometry_node_execute<T>(); - NodeDefinition<T>::typeinfo_.geometry_node_execute_supports_laziness = - detail::node_type_get__geometry_node_execute_supports_laziness<T>(); - - NodeDefinition<T>::register_type(); - } -}; +void geometry_node_make_runtime_type(struct bNodeType *ntype, + const char *idname, + const char *ui_name, + const char *ui_description, + int ui_icon, + short node_class, + const StructRNA *rna_base); void update_attribute_input_socket_availabilities(bNode &node, const StringRef name, |