I’ve been really wanting to get Pop Up Menu items to show up in VDMX.
I’ve thought and looked into creating custom classes, ports or a port editor but figured that all of the info is there already
and would be easier to just figure out how to help the VidVox guys out on their end.
I’ve used the example VuoPlugInApp and built from there. Changed a bunch of stuff around.
Aso in the VuoPlugIn.vuo comp edited it and added a few more things main a WAVE Node with a published WAVE port.
(see VuoPlugIn V02.vuo)
I needed to figure out how to:
-
Get a Runner Going, load an Composition … then
-
Get a list of input ports and get details about them a log
-
Then take the info from the WAVE port that has the menuItems key… (I added the check to see if it actually had the key)
-
I then pull out the keys: “name”, “value”… I know VDMX for ISF wants to see a array of “LABELS” and a matching array of “VALUES”.
-
I then built of NSMenuItems using the “name” IE Sine. and set it’s action selector to a function in my Class; waveTypeUpdatedFromUI:
-
then I built a separate NSDictionary to use for the associated object
aMenuItemDict is:{
Wave = triangle;
} -
I add each menuItem to a menu, then I set my App’s PopUp Button to the new Menu.
-
I then next test sending a new menu item selection back to the composition.
Here’s some screen shots and logs:
Here’s the first log query
2021-07-12 03:24:23.526225-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] inPorts is:(
Wave,
Amplitude,
Periods,
Which
)
2021-07-12 03:24:23.526315-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort is:Wave
2021-07-12 03:24:23.526579-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort details is:{
default = sine;
menuItems = (
{
name = Sine;
value = sine;
},
{
name = Triangle;
value = triangle;
},
{
name = Sawtooth;
value = sawtooth;
}
);
title = Wave;
type = VuoWave;
}
2021-07-12 03:24:23.526629-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort is:Amplitude
2021-07-12 03:24:23.526781-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort details is:{
default = "0.1";
title = Amplitude;
type = VuoReal;
}
2021-07-12 03:24:23.526819-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort is:Periods
2021-07-12 03:24:23.526885-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort details is:{
title = Periods;
type = "VuoList_VuoInteger";
}
2021-07-12 03:24:23.526921-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort is:Which
2021-07-12 03:24:23.527017-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort details is:{
default = 1;
suggestedMin = 1;
title = Which;
type = VuoInteger;
}
2021-07-12 03:24:23.529229-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner testPropertyListFromInput] propListFromInput is:{
Amplitude = "0.10000000000000001";
Periods = null;
Wave = "\"sine\"";
Which = 1;
}
2021-07-12 03:24:23.529344-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner setUpPopUpButton] aWaveDict is:{
default = sine;
menuItems = (
{
name = Sine;
value = sine;
},
{
name = Triangle;
value = triangle;
},
{
name = Sawtooth;
value = sawtooth;
}
);
title = Wave;
type = VuoWave;
}
2021-07-12 03:24:23.529464-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner setUpPopUpButton] allKeys is:(
menuItems,
title,
default,
type
)
2021-07-12 03:24:23.529536-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner parseMenuItemsAndBuildPopUp:] vuoMenuItems is:(
{
name = Sine;
value = sine;
},
{
name = Triangle;
value = triangle;
},
{
name = Sawtooth;
value = sawtooth;
}
)
And the LOGs after selecting a new Menu Item:
2021-07-12 03:28:40.871909-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner waveTypeUpdatedFromUI:] aMenuItemDict is:{
Wave = triangle;
}
2021-07-12 03:28:40.874537-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner waveTypeUpdatedFromUI:] okUpdate is:1
----------------- AND THEN LOG PUBLISHED INPUTS AGAIN NEXT
2021-07-12 03:29:39.391621-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] inPorts is:(
Wave,
Amplitude,
Periods,
Which
)
2021-07-12 03:29:39.391705-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort is:Wave
2021-07-12 03:29:39.391830-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort details is:{
default = sine;
menuItems = (
{
name = Sine;
value = sine;
},
{
name = Triangle;
value = triangle;
},
{
name = Sawtooth;
value = sawtooth;
}
);
title = Wave;
type = VuoWave;
}
2021-07-12 03:29:39.391900-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort is:Amplitude
2021-07-12 03:29:39.391984-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort details is:{
default = "0.1";
title = Amplitude;
type = VuoReal;
}
2021-07-12 03:29:39.392019-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort is:Periods
2021-07-12 03:29:39.392125-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort details is:{
title = Periods;
type = "VuoList_VuoInteger";
}
2021-07-12 03:29:39.392159-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort is:Which
2021-07-12 03:29:39.392227-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner logInputPorts:] aPort details is:{
default = 1;
suggestedMin = 1;
title = Which;
type = VuoInteger;
}
2021-07-12 03:29:39.395958-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner testPropertyListFromInput] propListFromInput is:{
Amplitude = "0.10000000000000001";
Periods = null;
Wave = "\"triangle\"";
Which = 1;
}
2021-07-12 03:29:39.396070-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner setUpPopUpButton] aWaveDict is:{
default = sine;
menuItems = (
{
name = Sine;
value = sine;
},
{
name = Triangle;
value = triangle;
},
{
name = Sawtooth;
value = sawtooth;
}
);
title = Wave;
type = VuoWave;
}
2021-07-12 03:29:39.396120-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner setUpPopUpButton] allKeys is:(
menuItems,
title,
default,
type
)
2021-07-12 03:29:39.396180-0700 VuoPluginApp[69787:614861] -[TechnoVuoRunner parseMenuItemsAndBuildPopUp:] vuoMenuItems is:(
{
name = Sine;
value = sine;
},
{
name = Triangle;
value = triangle;
},
{
name = Sawtooth;
value = sawtooth;
}
)
And here’s the ZIPPED Xcode project, Vuo comp and pics / logs
Vuo Working Menu Parsing.zip (1.36 MB)
thanks
Kerry