Skip to content

load_placeholder

HoudiniPlaceholderLoadPlugin

Bases: HoudiniPlaceholderPlugin, PlaceholderLoadMixin

Workfile template plugin to create "load placeholders".

"load placeholders" will be replaced by AYON products.

Source code in client/ayon_houdini/plugins/workfile_build/load_placeholder.py
12
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
class HoudiniPlaceholderLoadPlugin(
    HoudiniPlaceholderPlugin, PlaceholderLoadMixin
):
    """Workfile template plugin to create "load placeholders".

    "load placeholders" will be replaced by AYON products.

    """

    identifier = "ayon.load.placeholder"
    label = "Houdini Load"

    def populate_placeholder(self, placeholder):
        self.populate_load_placeholder(placeholder)

    def repopulate_placeholder(self, placeholder):
        self.populate_load_placeholder(placeholder)

    def get_placeholder_options(self, options=None):
        return self.get_load_plugin_options(options)

    def get_placeholder_node_name(self, placeholder_data):
        node_name = "{}_{}".format(
            self.identifier.replace(".", "_"),
            placeholder_data["product_name"]
        )
        return node_name

    def collect_placeholders(self):
        output = []
        load_placeholders = self.collect_scene_placeholders()

        for node in load_placeholders:
            placeholder_data = read(node)
            output.append(
                LoadPlaceholderItem(node.path(), placeholder_data, self)
            )

        return output