use of org.jwildfire.create.tina.randommovie.RandomMovieGenerator in project JWildfire by thargor6.
the class TinaSWFAnimatorController method createRandomBatch.
public boolean createRandomBatch(int pCount, String pGeneratorname) {
if (prefs.getTinaRandomBatchRefreshType() == RandomBatchRefreshType.CLEAR) {
randomBatch.clear();
}
int imgCount = prefs.getTinaRandomMovieBatchSize();
List<SimpleImage> imgList = new ArrayList<SimpleImage>();
int maxCount = (pCount > 0 ? pCount : imgCount);
renderProgressUpdater.initProgress(maxCount);
RandomMovieGenerator randGen = RandomMovieGeneratorList.getRandomMovieGeneratorInstance(pGeneratorname, true);
for (int i = 0; i < maxCount; i++) {
MovieThumbnail thumbnail;
thumbnail = new MovieThumbnail(randGen.createMovie(prefs), null);
SimpleImage img = thumbnail.getPreview(3 * prefs.getTinaRenderPreviewQuality() / 4);
if (prefs.getTinaRandomBatchRefreshType() == RandomBatchRefreshType.INSERT) {
randomBatch.add(0, thumbnail);
imgList.add(0, img);
} else {
randomBatch.add(thumbnail);
imgList.add(img);
}
renderProgressUpdater.updateProgress(i + 1);
}
updateThumbnails();
return true;
}
Aggregations