Skip to content

pipeline

Basic AYON integration

FlameHost

Bases: HostBase, ILoadHost, IPublishHost

Source code in client/ayon_flame/api/pipeline.py
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
class FlameHost(HostBase, ILoadHost, IPublishHost):
    name = "flame"

    # object variables
    _publish_context_data = {}

    def get_containers(self):
        return ls()

    def install(self):
        """Installing all requirements for Nuke host"""
        install()

    def get_context_data(self):
        # TODO: find a way to implement this
        return deepcopy(self._publish_context_data)

    def update_context_data(self, data, changes):
        # TODO: find a way to implement this
        self._publish_context_data = deepcopy(data)

install()

Installing all requirements for Nuke host

Source code in client/ayon_flame/api/pipeline.py
47
48
49
def install(self):
    """Installing all requirements for Nuke host"""
    install()

imprint(segment, data=None)

Adding AYON data to Flame timeline segment.

Also including publish attribute into tag.

Parameters:

Name Type Description Default
segment PySegment

flame api object

required
data dict

Any data which needst to be imprinted

None

Examples:

data = { 'asset': 'sq020sh0280', 'productType': 'render', 'productName': 'productMain' }

Source code in client/ayon_flame/api/pipeline.py
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
def imprint(segment, data=None):
    """
    Adding AYON data to Flame timeline segment.

    Also including publish attribute into tag.

    Arguments:
        segment (flame.PySegment)): flame api object
        data (dict): Any data which needst to be imprinted

    Examples:
        data = {
            'asset': 'sq020sh0280',
            'productType': 'render',
            'productName': 'productMain'
        }
    """
    data = data or {}

    set_segment_data_marker(segment, data)

    # add publish attribute
    set_publish_attribute(segment, True)

list_instances()

List all created instances from current workfile.

Source code in client/ayon_flame/api/pipeline.py
151
152
153
154
def list_instances():
    """List all created instances from current workfile."""
    # TODO: list_instances
    pass

ls()

List available containers.

Source code in client/ayon_flame/api/pipeline.py
114
115
116
117
def ls():
    """List available containers.
    """
    return []

on_pyblish_instance_toggled(instance, old_value, new_value)

Toggle node passthrough states on instance toggles.

Source code in client/ayon_flame/api/pipeline.py
134
135
136
137
138
def on_pyblish_instance_toggled(instance, old_value, new_value):
    """Toggle node passthrough states on instance toggles."""

    log.info("instance toggle: {}, old_value: {}, new_value:{} ".format(
        instance, old_value, new_value))

parse_container(tl_segment, validate=True)

Return container data from timeline_item's AYON tag.

Source code in client/ayon_flame/api/pipeline.py
120
121
122
123
124
def parse_container(tl_segment, validate=True):
    """Return container data from timeline_item's AYON tag.
    """
    # TODO: parse_container
    pass

remove_instance(instance)

Remove instance marker from track item.

Source code in client/ayon_flame/api/pipeline.py
145
146
147
148
def remove_instance(instance):
    """Remove instance marker from track item."""
    # TODO: remove_instance
    pass

update_container(tl_segment, data=None)

Update container data to input timeline_item's AYON tag.

Source code in client/ayon_flame/api/pipeline.py
127
128
129
130
131
def update_container(tl_segment, data=None):
    """Update container data to input timeline_item's AYON tag.
    """
    # TODO: update_container
    pass