# FMOD JS Scripting - Getting effect properties from plugin effect

**URL:** <https://qa.fmod.com/t/fmod-js-scripting-getting-effect-properties-from-plugin-effect/18456>\
**Category:** FMOD Studio\
**Created:** [March 2, 2022, 10:35pm UTC](https://qa.fmod.com/t/fmod-js-scripting-getting-effect-properties-from-plugin-effect/18456 "2022-03-02T22:35:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zaflores](https://avatars.discourse-cdn.com/v4/letter/z/7ea924/32.png) [@zaflores](https://qa.fmod.com/u/zaflores)\
**Post date:** [March 2, 2022, 10:35pm UTC](https://qa.fmod.com/t/fmod-js-scripting-getting-effect-properties-from-plugin-effect/18456/1 "2022-03-02T22:35:09Z")

</div>

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:

```auto
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:

```auto
(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

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [March 2, 2022, 11:30pm UTC](https://qa.fmod.com/t/fmod-js-scripting-getting-effect-properties-from-plugin-effect/18456/2 "2022-03-02T23:30:31Z")

</div>

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

```auto
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("----");
                    });
                }
        });
    });

```

---

<div class="post-metadata">

**Author:** ![zaflores](https://avatars.discourse-cdn.com/v4/letter/z/7ea924/32.png) [@zaflores](https://qa.fmod.com/u/zaflores)\
**Post date:** [March 3, 2022, 12:01am UTC](https://qa.fmod.com/t/fmod-js-scripting-getting-effect-properties-from-plugin-effect/18456/3 "2022-03-03T00:01:24Z")

</div>

worked perfectly! Appreciate it!
