NodeGraphQt icon indicating copy to clipboard operation
NodeGraphQt copied to clipboard

Change node/port text in runtime

Open Erol444 opened this issue 3 years ago • 1 comments

Hi! I would like to change port/node name in runtime, I expanded from example script (full script), snippet below. Is this even possible? Tried searching through docs/source code/github issues but didn't find anything. Thanks, Erik

    # create two nodes.
    node_a = graph.create_node('com.chantasticvfx.FooNode', name='node A')
    output = node_a.add_output(name='out1')
    node_b = graph.create_node('com.chantasticvfx.FooNode', name='node B', pos=(300, 50))
    input = node_b.add_input(name='in1')
    input.connect_to(output)
    graph.widget.show()

    i = 0
    while True:
        i+=1
        time.sleep(0.2)
        node_a.model.name = str(i)
        print(i)
        input.model.display_name = str(i)
        input.model.locked = False
        app.processEvents()

    app.exec_()

Erol444 avatar Nov 25 '22 06:11 Erol444

Hi @Erol444, currently this ability is not available yet in the frame work.

jchanvfx avatar Dec 19 '22 23:12 jchanvfx