I’ve a knowledge construction that represents a easy terrain system and a variety of filter algorithms that may be run on it. I would like to have the ability to apply them in in any arbitrary order and have a number of situations with their very own settings, principally how the Modfiers panel works in blender.
At present, the filters are SO’s that implement an interface. Then through Odin, I can expose an inventory of kind <IFilter>
to the inspector, and populate with SO situations in any order.
The script then iterates via the listing, feeding the output from one to the enter of the subsequent.
Record<Vertex2> generatedVerts = generateVerts(Settings settings)
foreach (var filter in filterList)
{
generatedVerts = filter.Course of(generatedVerts);
}
return generatedVerts;
It really works, however the issue is every entry within the listing is related to an occasion of the SO. So if I wish to tweak the settings, I’ve to maintain monitor of which SO occasion corresponds to which entry within the listing and it will get complicated.
What I actually need is an interface the place I can visually reorder modules within the inspector, however additionally they have their very own controls uncovered relatively than being pushed by a separate SO, as I say like the way it works with blender modifiers.
Can anybody recommend an method for this? I do have entry to Odin if that can assist.