I’m getting validation errors when trying to add a snapshot module to a group track via script. Ideally would love to just have a snapshot on a hotkey to add wherever I need it instead of copy-pasting, especially since there’s 3 or 4 different ones I need to apply quickly in different situations.
It seems that the normal [Grouptrack].addSound() doesn’t work with snapshot instruments, so I’ve been trying to do something like this:
var snptrack = newevent.addGroupTrack("Snapshot");
var snapshotInst = studio.project.create("SnapshotModule");
snptrack.relationships.modules.add(snapshotInst);
I’ve also tried doing it with snptrack.event.timeline.relationships.modules.add()
but both don’t seem to work. The return is TRUE but the instrument is not visible and FMOD will want to validate the project, after which it removes the relationships but the Snapshot Instrument I created still exists in the abstract.
What is required to create a valid Snapshot Module? I tried giving it a length and start time as well, but that doesn’t validate the object. Or where does it want to be attached?