Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Shuffle/Randomize FootageItems

  • Shuffle/Randomize FootageItems

    Posted by Steve Pugh on September 22, 2011 at 7:26 pm

    ** RE-POSTED FROM AE FORUM PER ANOTHER’S RECOMMENDATION **
    Hi all,

    I’ve got a comp project with several dozen footage items laid out in a grid. I would dearly love to be able to shuffle them around easily and quickly, to make a large number of different videowall type grids.

    Not being the greatest scripter, I’m reading the user’s selected footage into an array of FootageItems first – call it selectedFootage[]. My thinking was to copy the filepaths into a new string array and shuffle them, then loop the original arrey beginning to end, calling ReplaceWithSequence on each footageItem to replace it with it counterpart in the newly shuffled array.

    I can’t seem to get the full pathnames out of the original footageItems into the new array in a way that will work with ReplaceWithSequence.

    Is there some cleaner, more elegant way to accomplish this that I am missing? I can post my code if you want a good laugh.

    Cheers,
    Steve

    Dan Ebberts replied 14 years, 11 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    September 22, 2011 at 7:44 pm

    So the user’s footage is not loaded into the project yet, is that correct?

  • Steve Pugh

    September 22, 2011 at 9:05 pm

    Hi Dan,

    I’m starting with a project where the footage has indeed been loaded and laid out into the grid. My goal is to shuffle the source image sequences of each footage item, thereby causing the footage in the grid to shuffle without having to drag squares around.

  • Dan Ebberts

    September 22, 2011 at 9:32 pm

    Assuming all the footage has the same dimensions, I would create an array of the footage item numbers, shuffle that, and use replaceSource() on the grid layers.

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy