Minimal working RunScript node


#1

I like to understand how to use RunScript node to call an external renderer. Struggling with it, now I try to achieve something different then a black image.

This minimal script still gives a black image:

__ beginscript__

#!/bin/sh
cat /tmp/dummy.png #This path exists

__ endscript __
(Validate checked)

Do you have an idea how to use RunScript node?


#2

see http://natron.readthedocs.io/en/master/plugins/fr.inria.openfx.RunScript.html

RunScript should be preceded by a Write node and followed by a Read node that reads the file created by the script…


#3

Hi Frederic.
Thank you for your answer.
Using Read node and Write node was only a part. It just keeps not working, and It took me hours to figure it out.

There is a screenshot.

I need viewer2 to be connected to RunScript1 (arrow bottom left). Viewer2 also needs to be active viewer. And I need to click on one of RunScript1’s file parameter recycle buttons to activate RunScript1 node (arrow up right). Without these steps, RunScript1 won’t be triggerend.

Maybe I missed something. Do you know a more intuitive solution without active Viewer node attached directly to RunScript node, and without need to hit recycle button?


#4

the input of RunScript must be connected to the output of the Write1 node, and the Sync input of the Read1 node must be connected to RunScript.

That way, the following operations are always executed in order, for each frame:

  • Write1 the scriptinput.png
  • RunScript processes scriptinput.png, produces scriptoutput.png
  • Read1 reads scriptoutput.png

#5

OK hold on, I’m looking into it. something’s wrong with the read node


#6

The Sync connection of the Read node does not work anymore


#7

You can try the latest snapshots, they should somehow work (but it looks like it’s still a bit buggy).
If this is to run a batch job, it may work better with NatronRenderer.
Or you may also try to reduce the number of render threads


#8

Here’s a minimal RunScript example, with comments. Works with the 2.3.7 snapshot.
runscript-example.ntp (103.8 KB)


#9

Thank you for your effords.

I like to try it, but I do not know where to find the snapshot.


#10

https://natron.fr/download/ (you have to create an account on natron.fr to get access to the snapshots).
Or you can wait for a few days, I’ll probably roll out 2.3.7 at the end of the week.


#11

Now it works! :smiley:
Thank you