This class provides utility methods for interacting with lists of pdg.WorkItem instances that represent frames
Methods ¶
Static methods ¶
batchByFrame(work_items)
→ tuple
Splits the work items in the input list into batches consisting of increasing frame ranges. Returns a list of lists of work items in each batch, as well as a separate list of work items that have no frame assigned.
For example, given input work items with the frame values [1, 1, 1, 2, 2, 2, 3, 3, 4]
, the following output would be produced:
`
[
]
`
detectFrameRange(work_items, step_precision=100)
→ tuple
Detects the minimal (start, end, step)
frame range values that contain all of the pdg.WorkItems in the work_items
list.
If the frame step sizes of the input work items aren’t the same, the method will attempt to find the lowest common multiple of all the step sizes that accurately generates the full range of frame values. The step_precision
influences how much rounding is applied when calculating the common step value between frames from different ranges.
detectFrameRange(frames, step_precision=100)
→ tuple
Detects the minimal (start, end, step)
frame range values that contain all of the floating point frame values in the frames
list.
If the frame step sizes of the input frames aren’t the same, the method will attempt to find the lowest common multiple of all the step sizes that accurately generates the full range of frame values. The step_precision
influences how much rounding is applied when calculating the common step value between frames from different ranges.