Skip to content

_load_animation

AbcLoader

Bases: ReferenceLoader

Loader to reference an Alembic file

Source code in client/ayon_maya/plugins/load/_load_animation.py
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
71
72
73
74
class AbcLoader(ayon_maya.api.plugin.ReferenceLoader):
    """Loader to reference an Alembic file"""

    product_types = {
        "animation",
        "camera",
        "pointcache",
    }
    representations = {"abc"}

    label = "Reference animation"
    order = -10
    icon = "code-fork"
    color = "orange"

    def process_reference(self, context, name, namespace, options):

        cmds.loadPlugin("AbcImport.mll", quiet=True)
        # hero_001 (abc)
        # asset_counter{optional}
        path = self.filepath_from_context(context)
        file_url = self.prepare_root_value(path,
                                           context["project"]["name"])

        nodes = _process_reference(file_url, name, namespace, options)
        # load colorbleed ID attribute
        self[:] = nodes

        return nodes

FbxLoader

Bases: ReferenceLoader

Loader to reference an Fbx files

Source code in client/ayon_maya/plugins/load/_load_animation.py
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
class FbxLoader(ayon_maya.api.plugin.ReferenceLoader):
    """Loader to reference an Fbx files"""

    product_types = {
        "animation",
        "camera",
    }
    representations = {"fbx"}

    label = "Reference animation"
    order = -10
    icon = "code-fork"
    color = "orange"

    def process_reference(self, context, name, namespace, options):

        cmds.loadPlugin("fbx4maya.mll", quiet=True)

        path = self.filepath_from_context(context)
        file_url = self.prepare_root_value(path,
                                           context["project"]["name"])

        nodes = _process_reference(file_url, name, namespace, options)

        self[:] = nodes

        return nodes