Skip to content

import_workfile

AppendBlendLoader

Bases: BlenderLoader

Append workfile in Blender (unmanaged)

Warning

The loaded content will be unmanaged and is not visible in the scene inventory. It's purely intended to merge content into your scene so you could also use it as a new base.

Source code in client/ayon_blender/plugins/load/import_workfile.py
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
class AppendBlendLoader(plugin.BlenderLoader):
    """Append workfile in Blender (unmanaged)

    Warning:
        The loaded content will be unmanaged and is *not* visible in the
        scene inventory. It's purely intended to merge content into your scene
        so you could also use it as a new base.
    """

    representations = {"blend"}
    product_types = {"workfile"}

    label = "Append Workfile"
    order = 9
    icon = "arrow-circle-down"
    color = "#775555"

    def load(self, context, name=None, namespace=None, data=None):
        path = self.filepath_from_context(context)
        append_workfile(context, path, False)

        # We do not containerize imported content, it remains unmanaged
        return

ImportBlendLoader

Bases: BlenderLoader

Import workfile in the current Blender scene (unmanaged)

Warning

The loaded content will be unmanaged and is not visible in the scene inventory. It's purely intended to merge content into your scene so you could also use it as a new base.

Source code in client/ayon_blender/plugins/load/import_workfile.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
class ImportBlendLoader(plugin.BlenderLoader):
    """Import workfile in the current Blender scene (unmanaged)

    Warning:
        The loaded content will be unmanaged and is *not* visible in the
        scene inventory. It's purely intended to merge content into your scene
        so you could also use it as a new base.
    """

    representations = {"blend"}
    product_types = {"workfile"}

    label = "Import Workfile"
    order = 9
    icon = "arrow-circle-down"
    color = "#775555"

    def load(self, context, name=None, namespace=None, data=None):
        path = self.filepath_from_context(context)
        append_workfile(context, path, True)

        # We do not containerize imported content, it remains unmanaged
        return