TheFoundryVisionmongers / nuke-ML-server

A Nuke client plug-in which connects to a Python server to allow Machine Learning inference in Nuke.
Apache License 2.0
135 stars 34 forks source link

Cannot execute MLClient node from Python script #33

Open Iftimie opened 2 years ago

Iftimie commented 2 years ago

Hi! Many thanks for this great project.

I'm trying to write some integration tests, but without much success. Here is what I tried so far, but I get the errors below.

image_node = nuke.nodes.Read(file = "/path/to/file.jpg")
ml_node = nuke.nodes.MLClient()

# Maybe something like this would trigger the node to connect to the server?
# ml_node.knobs()['connect'].execute()

ml_node.setInput( 0, image_node )
nuke.execute(ml_node, 1,2)
# RuntimeError: MLClient1 cannot be executed
# MLClient1 cannot be executed

Any advice is highly appreciated