Skip to content

image_sequence

ImageSequenceNode

Bases: WorkflowTaskNode

Define an image sequence path (existing or not).

Source code in client/ayon_workflow/plugins/workflow/essentials/image_sequence.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
class ImageSequenceNode(WorkflowTaskNode):
    """Define an image sequence path (existing or not)."""

    name = "ImageSequence"
    version = "0.0.1"
    inputs = [
        InputAttribute(
            name="directory",
            description="The path to the parent directory.",
            widget={
                "name": "filepath",
                "select": "directory",
                "caption": "Select a directory",
            },
        ),
        InputAttribute(
            name="head",
            description="The head of the sequence e.g. `img.`."
        ),
        InputAttribute(
            name="tail",
            description="The tail of the sequence e.g. `.jpg`."
        ),
        InputAttribute(
            name="frame_range",
            description="An optional frame_range."
        ),
        InputAttribute(
            name="padding",
            description="An optional frame range padding."
        ),
    ]

    outputs = [
        OutputAttribute(
            name="image_sequence",
            description="The resolved image sequence.",
        )
    ]

    def execute(
        self,
        head: str,
        tail: str,
        directory: Optional[str] = None,
        padding: Optional[int] = 4,
        frame_range: Optional[FrameRange] = None,
    ) -> ImageSequence:
        """ Resolves the image sequence path.
        """
        directory = check_parent_directory(directory)
        return ImageSequence(
            directory=directory,
            head=head,
            tail=tail,
            padding=padding,
            frame_range=frame_range,
        )

execute(head, tail, directory=None, padding=4, frame_range=None)

Resolves the image sequence path.

Source code in client/ayon_workflow/plugins/workflow/essentials/image_sequence.py
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
def execute(
    self,
    head: str,
    tail: str,
    directory: Optional[str] = None,
    padding: Optional[int] = 4,
    frame_range: Optional[FrameRange] = None,
) -> ImageSequence:
    """ Resolves the image sequence path.
    """
    directory = check_parent_directory(directory)
    return ImageSequence(
        directory=directory,
        head=head,
        tail=tail,
        padding=padding,
        frame_range=frame_range,
    )