Skip to content

colorspace

ARenderProduct

Bases: object

Source code in client/ayon_blender/api/colorspace.py
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
class ARenderProduct(object):
    def __init__(self, frame_start, frame_end):
        """Constructor."""
        # Initialize
        self.layer_data = self._get_layer_data(frame_start, frame_end)

    def _get_layer_data(
        self,
        frame_start: int,
        frame_end: int
    ) -> LayerMetadata:
        return LayerMetadata(
            frameStart=int(frame_start),
            frameEnd=int(frame_end),
        )

    def add_render_product(
        self,
        product_name: str,
        colorspace="",
        display="",
        view=""):
        self.layer_data.products.append(
            RenderProduct(
                productName=product_name,
                colorspace=colorspace,
                display=display,
                view=view
            )
        )

__init__(frame_start, frame_end)

Constructor.

Source code in client/ayon_blender/api/colorspace.py
25
26
27
28
def __init__(self, frame_start, frame_end):
    """Constructor."""
    # Initialize
    self.layer_data = self._get_layer_data(frame_start, frame_end)

LayerMetadata

Bases: object

Data class for Render Layer metadata.

Source code in client/ayon_blender/api/colorspace.py
16
17
18
19
20
21
@attr.s
class LayerMetadata(object):
    """Data class for Render Layer metadata."""
    frameStart = attr.ib()
    frameEnd = attr.ib()
    products: list[RenderProduct] = attr.ib(factory=list)

RenderProduct

Bases: object

Getting Colorspace as Specific Render Product Parameter for submitting publish job.

Source code in client/ayon_blender/api/colorspace.py
 4
 5
 6
 7
 8
 9
10
11
12
13
@attr.s
class RenderProduct(object):
    """
    Getting Colorspace as Specific Render Product Parameter for submitting
    publish job.
    """
    colorspace = attr.ib()  # OCIO source colorspace
    display = attr.ib()     # OCIO source display transform
    view = attr.ib()        # OCIO source view transform
    productName = attr.ib()