Natron read node won’t actually load file(s) through API – Natron

I’m having a devil of a time trying to get the Natron API to load QuickTimes or image sequences. No matter what I try in setting filename or triggering reloadFile() it doesn’t load. I can run the script in the Natron GUI and press the reload button manually and then all is fine, but there seems to be no way to do this programmatically?

Natron 2.4.1 runningon Windows Server 2022.

Here’s some example code:

def createInstance(app,group):
writeNode = app.createNode(“fr.inria.openfx.WriteFFmpeg”)
writeNode.setScriptName(“MyWriter”)

readNode = app.createNode("fr.inria.openfx.ReadFFmpeg")
#readNode = app.createNode("fr.inria.openfx.ReadOIIO")
readNode.setScriptName("MyReader")

writeNode.connectInput(0,readNode)

param =  readNode.getParam("filename")
param.setValue("Z:\\TestFootage.mov")

#param.setValue("Z:\\TestFootage.######.exr")
#param =  readNode.getParam("firstFrame")
#param.setValue(393360)
#param =  readNode.getParam("lastFrame")
#param.setValue(393370)
#param =  readNode.getParam("startingTime")
#param.setValue(393360)

param =  readNode.getParam("filename")
param.reloadFile()

param =  writeNode.getParam("filename")
param.setValue("Z:\\Out.mov")

This just renders black with NatronRenderer.exe, unless I load it with Natron.exe and manually click the “reload” button on MyReader and then it actually loads the .mov or .exr sequence. What am I missing?

Read more here: Source link