Closed azeno closed 9 months ago
One approach could be to add a second parameter to EnumType
taking a relative path to the dll. That path could then be used in AddEnumTypePinAttribute
to load the assembly and query the type from it.
The name of the assembly should be enough if it is loaded, i.e. referenced by the .vl doc next to the shaders folder: https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assembly.load?view=net-6.0#system-reflection-assembly-load(system-reflection-assemblyname)
Just realized this works when using assembly qualified names. Just tested the following on https://github.com/bj-rn/VL.Addons/blob/main/vl/shaders/Pulse_Internal_TextureFX.sdsl and it worked:
[EnumType("VL.Stride.Effects.TextureFX.PulseChannel, TextureFX")]
int ChannelType;
Describe the bug See https://discourse.vvvv.org/t/how-to-make-shaders-pickup-custom-enums/21448
We'll need to add an option to guide the system to dll where the enum is defined.
Which version are you experiencing the bug with? 5.0
Expected behavior The enum should get picked up.