diff --git a/colorbleed/plugins/maya/publish/validate_mesh_non_zero_edge.py b/colorbleed/plugins/maya/publish/_validate_mesh_non_zero_edge.py similarity index 83% rename from colorbleed/plugins/maya/publish/validate_mesh_non_zero_edge.py rename to colorbleed/plugins/maya/publish/_validate_mesh_non_zero_edge.py index b706913592..02019da523 100644 --- a/colorbleed/plugins/maya/publish/validate_mesh_non_zero_edge.py +++ b/colorbleed/plugins/maya/publish/_validate_mesh_non_zero_edge.py @@ -2,8 +2,7 @@ from maya import cmds import pyblish.api import colorbleed.api - -from pyblish_cb.tmp_utils import polyConstraint +import colorbleed.maya.lib as lib class ValidateMeshNonZeroEdgeLength(pyblish.api.InstancePlugin): @@ -41,17 +40,16 @@ class ValidateMeshNonZeroEdgeLength(pyblish.api.InstancePlugin): edges = ['{0}.e[*]'.format(node) for node in meshes] # Filter by constraint on edge length - invalid = polyConstraint(edges, - t=0x8000, # type=edge - length=1, - lengthbound=(0, cls.__tolerance)) + invalid = lib.polyConstraint(edges, + t=0x8000, # type=edge + length=1, + lengthbound=(0, cls.__tolerance)) return invalid def process(self, instance): """Process all meshes""" invalid = self.get_invalid(instance) - if invalid: raise RuntimeError("Meshes found with zero " "edge length: {0}".format(invalid)) diff --git a/colorbleed/plugins/maya/publish/extract_alembic.py b/colorbleed/plugins/maya/publish/extract_alembic.py index 2bde0bfe9a..83a87e7a6b 100644 --- a/colorbleed/plugins/maya/publish/extract_alembic.py +++ b/colorbleed/plugins/maya/publish/extract_alembic.py @@ -1,6 +1,8 @@ import os import copy +import maya.cmds as cmds + import avalon.maya import colorbleed.api from colorbleed.maya.lib import extract_alembic @@ -26,9 +28,14 @@ class ExtractAlembic(colorbleed.api.Extractor): path = os.path.join(parent_dir, filename) options = copy.deepcopy(instance.data) - options['selection'] = True + options["attr"] = ["cbId"] + # force elect items to ensure all items get exported by Alembic + members = instance.data("setMembers") + cmds.select(members) with avalon.maya.suspended_refresh(): with avalon.maya.maintained_selection(): extract_alembic(file=path, **options) + + cmds.select(clear=True)