I have a script that places a checkerboard generated media temporarily on the timeline, refreshes the timeline, and then asks the user whether they want to delete the track where the checkerboard appears. If they say NO, they don't want to delete the track, I remove the checkerboard.
Everything works well, but I can't figure out how to also remove the checkerboard from the MediaPool. I add the media with this line:
mymedia = new Media(generator, presetName);
If I know that I am going to immediately remove this media, is there a way I can get the identifier and then use this in a line similar to this:
proj.MediaPool.Remove(inputFile);
This one works if you give it the name of the file name. For generated files, this name is instead a name that Vegas produces.
Everything works well, but I can't figure out how to also remove the checkerboard from the MediaPool. I add the media with this line:
mymedia = new Media(generator, presetName);
If I know that I am going to immediately remove this media, is there a way I can get the identifier and then use this in a line similar to this:
proj.MediaPool.Remove(inputFile);
This one works if you give it the name of the file name. For generated files, this name is instead a name that Vegas produces.