Skip to content

How to unregister Backdrop node #481

@pierremonico

Description

@pierremonico

Hey, I am trying to instantiate a graph that doesn't include the Backdrop Node:

class MyNodeGraph(NodeGraph):
    def __init__(self, parent=None):
        super(MyNodeGraph, self).__init__(parent)

However, __init__ calls _register_builtin_nodes(), which calls register_node(BackdropNode, alias='Backdrop'). So unless I override __init__, my best bet is to delete the node. Weirdly, I am not able to access it by any means (self in the current context is an instance of MyNodeGraph):

> self.registered_nodes()
> ['nodeGraphQt.nodes.BackdropNode']

> backdrop_node_type = self.registered_nodes()[0]

> print(backdrop_node_type)
> nodeGraphQt.nodes.BackdropNode

> self.get_nodes_by_type(backdrop_node_type)
> []

> self.get_node_by_name("Backdrop")
> None

Am I missing something? How can I access that Backdrop node and unregister it from the graph?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions