AWS Thinkbox Discussion Forums

Loop over Frame List

Hello,

I need help to implement a method that uses the Frame list to perform some operations.
Right now my problem is identifying the Frame List on the event OnJobFinished.

I’m using
Frame = job.JobFrames
which works fine when I have just only one frame.
When I have a list of frames like this: 1-28,30-31,33-37,39-41,43-47,49-55,57-62 is very difficult to iterate over the string.

I tried implementing JobFramesList, however all my tries failed.
Is there an example of how to use JobFramesList or another method to get an array/list with all the frames inside it?

Thanks in advance.

I haven’t had a chance to test it, but give this function a shot. It looks like it should take in your frame list string and return an integer array. Which sounds like what you’re looking for.

1 Like

It worked perfectly.
I will just paste here the part of the code I’m using in case someone needs in the future.

            Frame = FrameUtils.Parse(job.JobFrames)
        
            
            self.LogInfo( "Starting PNGQuant Log" )
            
            #Loop over the frames
            for i in range(0,len(Frame)):
            
                frame_rev = str(Frame[i])
1 Like
Privacy | Site terms | Cookie preferences