godot/ui/graph_view_model.py
def add_node(self, info):
        """ Handles adding a Node to the graph.
        """
        if not info.initialized:
            return

        graph = self._request_graph(info.ui.control)

        if graph is None:
            return

        IDs = [v.ID for v in graph.nodes]
        node = Node(ID=make_unique_name("node", IDs))
        graph.nodes.append(node)

        retval = node.edit_traits(parent=info.ui.control, kind="livemodal")

        if not retval.result:
            graph.nodes.remove(node)
def add_node(self, info):
        if not info.initialized:
            return

        graph = self._request_graph(info.ui.control)

        if graph is None:
            return

        IDs = [v.ID for v in graph.nodes]
        node = Node(ID=make_unique_name("node", IDs))
        graph.nodes.append(node)

        retval = node.edit_traits(parent=info.ui.control, kind="livemodal")

        if not retval.result:
            graph.nodes.remove(node)
def add_node ( self , info ) : if not info . initialized : return graph = self . _request_graph ( info . ui . control ) if graph is None : return IDs = [ v . ID for v in graph . nodes ] node = Node ( ID = make_unique_name ( "node" , IDs ) ) graph . nodes . append ( node ) retval = node . edit_traits ( parent = info . ui . control , kind = "livemodal" ) if not retval . result : graph . nodes . remove ( node )
Handles adding a Node to the graph.
Handles adding a Node to the graph .