Very specific question to the project I am working on:
With FMOD scripting, is it possible to figure out if a parameter is used for automation on any events on the master track of an event?
I basically need to check if our “Occlusion” parameter is used on the master track of events in our project
Calling .dump() on variables in the scripting console is a great way to inspect their properties and check what is available.
For your specific case, you could loop through the relevant arrays and check if any event’s master track uses a parameter whose name matches “Occlusion”.
Hope this helps, please don’t hesitate to ask if you have questions.
Thank you! I am struggling a bit making this work. Will this only work if “Show Automation in Editor” is enabled for the parameter (which it is not for our events)?
Was able to find it like this, which might be a horrible way to do it, but seems to work at least. Wasn’t able to look at effects inside effect chains though, so made a separate post about that.
function checkEffectForOcclusionParameter(effect) {
if (effect.automators && effect.automators.length > 0) {
for (var i = 0; i < effect.automators.length; i++) {
var automator = effect.automators[i];
if (automator.automationCurves && automator.automationCurves.length > 0) {
for (var j = 0; j < automator.automationCurves.length; j++) {
var curve = automator.automationCurves[j];
if (curve.parameter && curve.parameter.presetOwner && curve.parameter.presetOwner.name === "Occlusion") {
return true;
}
}
}
}
}
return false;
}