Blender V4.3
deg_node_factory.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2019 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11namespace blender::deg {
12
13/* Global type registry */
15
17{
18 BLI_assert(factory != nullptr);
19 const int type_as_int = int(factory->type());
20 node_typeinfo_registry[type_as_int] = factory;
21}
22
24{
25 /* Look up type - at worst, it doesn't exist in table yet, and we fail. */
26 const int type_as_int = int(type);
27 return node_typeinfo_registry[type_as_int];
28}
29
30} // namespace blender::deg
#define BLI_assert(a)
Definition BLI_assert.h:50
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
void register_node_typeinfo(DepsNodeFactory *factory)
DepsNodeFactory * type_get_factory(const NodeType type)
static DepsNodeFactory * node_typeinfo_registry[int(NodeType::NUM_TYPES)]
virtual NodeType type() const =0