diff --git a/openpype/hosts/maya/plugins/create/create_proxy_abc.py b/openpype/hosts/maya/plugins/create/create_proxy_abc.py index 2946f7b530..d89470ebee 100644 --- a/openpype/hosts/maya/plugins/create/create_proxy_abc.py +++ b/openpype/hosts/maya/plugins/create/create_proxy_abc.py @@ -2,34 +2,49 @@ from openpype.hosts.maya.api import ( lib, plugin ) +from openpype.lib import ( + BoolDef, + TextDef +) -class CreateProxyAlembic(plugin.Creator): +class CreateProxyAlembic(plugin.MayaCreator): """Proxy Alembic for animated data""" - name = "proxyAbcMain" + identifier = "io.openpype.creators.maya.proxyabc" label = "Proxy Alembic" family = "proxyAbc" icon = "gears" write_color_sets = False write_face_sets = False - def __init__(self, *args, **kwargs): - super(CreateProxyAlembic, self).__init__(*args, **kwargs) + def get_instance_attr_defs(self): - # Add animation data - self.data.update(lib.collect_animation_data()) + defs = lib.collect_animation_defs() - # Vertex colors with the geometry. - self.data["writeColorSets"] = self.write_color_sets - # Vertex colors with the geometry. - self.data["writeFaceSets"] = self.write_face_sets - # Default to exporting world-space - self.data["worldSpace"] = True + defs.extend([ + BoolDef("writeColorSets", + label="Write vertex colors", + tooltip="Write vertex colors with the geometry", + default=self.write_color_sets), + BoolDef("writeFaceSets", + label="Write face sets", + tooltip="Write face sets with the geometry", + default=self.write_face_sets), + BoolDef("worldSpace", + label="World-Space Export", + default=True), + TextDef("nameSuffix", + label="Name Suffix for Bounding Box", + default="_BBox", + placeholder="_BBox"), + TextDef("attr", + label="Custom Attributes", + default="", + placeholder="attr1, attr2"), + TextDef("attrPrefix", + label="Custom Attributes Prefix", + placeholder="prefix1, prefix2") + ]) - # name suffix for the bounding box - self.data["nameSuffix"] = "_BBox" - - # Add options for custom attributes - self.data["attr"] = "" - self.data["attrPrefix"] = "" + return defs