FMOD JS Scripting - Getting effect properties from plugin effect

Hello,

I’m currently trying to write an FMOD Studio javascript script that needs the properties from the Oculus Spatializer effect from the Oculus plugin (min distance, max distance, etc.) However when I access the properties and dump them, the settable properties don’t show in the dump() of the effect.

My JS script currently looks something like this:

studio.menu.addMenuItem({
    name: "Scripts\\Swap Spatitalizers",
    execute: function() {
		var selectedEvents = studio.window.browserSelection();
		selectedEvents.forEach(function(event)
			{
				var effectChain = event.masterTrack.mixerGroup.effectChain;
				var effectChainEffects = effectChain.effects;
				effectChainEffects.forEach(function(eventEffect)
					{
						if(eventEffect.isOfType("PluginEffect"))
						{
							//Found plugin on event
							console.log(eventEffect.dump());
						}
					});
			});
    },
});

And the output I am getting from this dump is:

(ManagedPropertyMap:PluginEffect):

parent: (ManagedObject:PluginEffect),

uiModulationDrawerVisible: (ManagedProperty:PluginEffect.uiModulationDrawerVisible),

uiTriggerBehaviorDrawerVisible: (ManagedProperty:PluginEffect.uiTriggerBehaviorDrawerVisible),

bypass: (ManagedProperty:PluginEffect.bypass),

dump: <function>,

Does this plugin just not support FMODStudio javascript for accessing the properties, or am I missing something here? Any guidance would be appreciated

To get the settings of the Oculus effect, you need to iterate through each of the plugin’s parameters. Try this bit of code:

var selectedEvents = studio.window.browserSelection();
selectedEvents.forEach(function(event)
    {
        var effectChain = event.masterTrack.mixerGroup.effectChain;
        var effectChainEffects = effectChain.effects;
        effectChainEffects.forEach(function(eventEffect) 
        {
                if(eventEffect.isOfType("PluginEffect"))
                {
                    //Found plugin on event
                    eventEffect.plugin.pluginParameters.forEach(function(param) 
                    {
                        console.log(param.dump());
                        console.log("----");
                    });
                }
        });
    });
1 Like

worked perfectly! Appreciate it!