Include overlay images with used images
@@ -359,7 +359,15 @@ export const precompileImages = async (
projectRoot,
tmpPath
) => {
- const usedImages = images.filter(image =>
+ let eventImageIds = [];
+ walkScenesEvents(scenes, cmd => {
+ if (cmd.args && cmd.args.hasOwnProperty("imageId")) {
+ eventImageIds.push(cmd.args.imageId);
+ }
+ });
+ const usedImages = images.filter(
+ image =>
+ eventImageIds.indexOf(image.id) > -1 ||
scenes.find(scene => scene.imageId === image.id)
);
const imageLookup = indexArray(usedImages, "id");
