Triggering a script

 

How can I trigger a script? I can declare a trigger input pin:

--$ inTrigger trigger

 I supposed that  any time this pin would change it would run the script but it does not work (I tried with Once On Change On and Off).

Is there a way in Aximmetry LUA to handle the trigger input pin?



   Eric Soulard

 
Profile Image
Eric Soulard
  -  

Hi,

I've found out in the samples the change declarative.

Best

 
Profile Image
Eifert@Aximmetry
  -  

Hi Eric,

Yes, the change declarative can do this. The following LUA script will only run the "if" and give a value when the input vector pin "inApple vector change" changes. Otherwise, it will give an empty value:

--$ inApple vector change
--$ outBanana vector

if inApple_Changed then
    outBanana = inApple
end
When the Script node's Once On Change pin is turned on, then the script will only run when any of the input pin's value changes. Otherwise, it will give back the previous result:


In the above screenshot, the script will only run if either of the colors changes, otherwise, it gives back the previous result.

You can also achieve similar logic with the Hold module. In this example, the script will only run when the Pass pin is triggered. Otherwise, it will give back the previous result:


You might have issues when using the Once On Change with --$ inTrigger trigger as there is a bug when triggering scripts directly with the trigger button and Once On Change detecting it. Like the following setup will only detect change once:

While adding an extra Copy Trigger module before the Script fixes the bug:

Warmest regards,

 
Profile Image
Eric Soulard
  -  

May thanks!

 
Profile Image
Eifert@Aximmetry
  -  

Hi Eric,

The bug related to the Once On Change pin has been fixed in the latest version of Aximmetry (2023.1.0):
Fixed incorrect behavior of Trigger input and output pins in the Script module when Once On Change was active.
https://aximmetry.com/learn/software-version-history/#%E2%96%BA-latest-2023-1-0

Warmest regards,

 
Profile Image
Eric Soulard
  -  

Hi,

I have another question. One of our customers is using 4 renderign engines networked for a multicam production. I have created compounds for lower thirds and data processing. I would like to run these scripts and compounds only on the master system as we're facing rendering issues with the slave ones (the lower thirds are generated using the Aximmetry redering engine over Unreal). By the way, we're using rgba video files (prores) for the lowerthirds background and we don't understand why itis running fine on the master machine and stuttering on the slave ones. Anyway, I've found that the System params module allows me to identify the machine I'm running on. Is it possible to use that to deactivate complex compounds, actually not rendering them ontheslave machines? 

Regards

 
Profile Image
Eifert@Aximmetry
  -  

Hi Eric,

Please make new posts about different issues or questions. It will make the forum clean and more easily searchable.

Yes, you can use System Params to deactivate modules, like:

Note there are many ways to deactivate connected modules. And Aximmetry does not execute every module in the Flow Editor: https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/scripting-in-aximmetry/flow-editor/module/#module-execution

Is the prores video part of the shared networked project? It could be that your network (router) is not fast enough.
You could save this video on each machine. And use System Params to open different paths depending on your machine Id (engine), this way each machine could load the video from its own drive and it wouldn't need to load it through the network connection.
Please reply back if this solves the issue.

Also, Remote Peeker is a very useful tool when making different logic per rendering machine:
https://aximmetry.com/learn/tutorials/for-studio-operators/setting-up-a-multi-machine-configuration/#remote-peeker

Warmest regards,

 
Profile Image
Eric Soulard
  -  

Hi,

yes, theprores is part of the shared network project. I've already modif the scene compound in order to output lowerthirds on separated SDI outputs on the main machine (key +fill, output 3 and 4) instead as overlays. Remote machines won't have physical outputs 3and 4.

I'll how to modify the files paths andtell you how it goes.

All the best