WIP: Closures and deferred evaluation for geometry nodes #107842
|
@ -634,6 +634,13 @@ inline bool bNode::is_group_output() const
|
|||
return this->type == NODE_GROUP_OUTPUT;
|
||||
}
|
||||
|
||||
inline bool bNode::can_verify_sockets_on_read() const
|
||||
{
|
||||
/* Don't update node groups here because they may depend on other node groups which are not
|
||||
* fully versioned yet and don't have `typeinfo` pointers set. */
|
||||
return !is_group() && !ELEM(this->type, GEO_NODE_BIND_FUNCTION);
|
||||
}
|
||||
|
||||
inline blender::Span<bNodeLink> bNode::internal_links() const
|
||||
{
|
||||
return this->runtime->internal_links;
|
||||
|
|
|
@ -1340,9 +1340,7 @@ void ntreeBlendReadLib(BlendLibReader *reader, bNodeTree *ntree)
|
|||
* to match the static layout. */
|
||||
if (!BLO_read_lib_is_undo(reader)) {
|
||||
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
|
||||
/* Don't update node groups here because they may depend on other node groups which are not
|
||||
* fully versioned yet and don't have `typeinfo` pointers set. */
|
||||
if (!node->is_group()) {
|
||||
if (node->can_verify_sockets_on_read()) {
|
||||
node_verify_sockets(ntree, node, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -383,6 +383,7 @@ typedef struct bNode {
|
|||
bool is_group() const;
|
||||
bool is_group_input() const;
|
||||
bool is_group_output() const;
|
||||
bool can_verify_sockets_on_read() const;
|
||||
const blender::nodes::NodeDeclaration *declaration() const;
|
||||
/** A span containing all internal links when the node is muted. */
|
||||
blender::Span<bNodeLink> internal_links() const;
|
||||
|
|
Loading…
Reference in New Issue