From e2413854a82a8c6d49c159a379c9d981ce766fcf Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 13 Dec 2018 21:10:53 +0100 Subject: [PATCH 1/3] Remove outdated docstring content --- .../plugins/maya/publish/collect_instances.py | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/colorbleed/plugins/maya/publish/collect_instances.py b/colorbleed/plugins/maya/publish/collect_instances.py index 807b57c710..93d8a20c8a 100644 --- a/colorbleed/plugins/maya/publish/collect_instances.py +++ b/colorbleed/plugins/maya/publish/collect_instances.py @@ -12,29 +12,14 @@ class CollectInstances(pyblish.api.ContextPlugin): Identifier: id (str): "pyblish.avalon.instance" - Supported Families: - avalon.model: Geometric representation of artwork - avalon.rig: An articulated model for animators. - A rig may contain a series of sets in which to identify - its contents. - - - cache_SEL: Should contain cachable polygonal meshes - - controls_SEL: Should contain animatable controllers for animators - - resources_SEL: Should contain nodes that reference external files - - Limitations: - - Only Maya is supported - - One (1) rig per scene file - - Unmanaged history, it is up to the TD to ensure - history is up to par. - avalon.animation: Pointcache of `avalon.rig` - Limitations: - Does not take into account nodes connected to those within an objectSet. Extractors are assumed to export with history preserved, but this limits what they will be able to achieve and the amount of data available - to validators. + to validators. An additional collector could also + append this input data into the instance, as we do + for `colorbleed.rig` with collect_history. """ From da4b30c8a42dd9c544bac2a1e3a0807fe16910d2 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 14 Dec 2018 11:50:01 +0100 Subject: [PATCH 2/3] Suspend all viewports during camera extraction (optimization) (PLN-202) --- colorbleed/plugins/maya/publish/extract_camera_alembic.py | 2 +- colorbleed/plugins/maya/publish/extract_camera_mayaAscii.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/colorbleed/plugins/maya/publish/extract_camera_alembic.py b/colorbleed/plugins/maya/publish/extract_camera_alembic.py index 0b315a8d6b..7ed65e0d44 100644 --- a/colorbleed/plugins/maya/publish/extract_camera_alembic.py +++ b/colorbleed/plugins/maya/publish/extract_camera_alembic.py @@ -67,7 +67,7 @@ class ExtractCameraAlembic(colorbleed.api.Extractor): job_str += ' -file "{0}"'.format(path) with lib.evaluation("off"): - with lib.no_refresh(): + with avalon.maya.suspended_refresh(): cmds.AbcExport(j=job_str, verbose=False) if "files" not in instance.data: diff --git a/colorbleed/plugins/maya/publish/extract_camera_mayaAscii.py b/colorbleed/plugins/maya/publish/extract_camera_mayaAscii.py index 09e1d535e4..e8a67d4f19 100644 --- a/colorbleed/plugins/maya/publish/extract_camera_mayaAscii.py +++ b/colorbleed/plugins/maya/publish/extract_camera_mayaAscii.py @@ -127,7 +127,7 @@ class ExtractCameraMayaAscii(colorbleed.api.Extractor): self.log.info("Performing camera bakes for: {0}".format(transform)) with avalon.maya.maintained_selection(): with lib.evaluation("off"): - with lib.no_refresh(): + with avalon.maya.suspended_refresh(): baked = lib.bake_to_world_space( transform, frame_range=range_with_handles, From 7705c7ea5082e75ac28c92914a55ce498d9d0a1f Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 14 Dec 2018 12:49:44 +0100 Subject: [PATCH 3/3] Remove unused function, favored by avalon.maya.suspended_refresh() --- colorbleed/maya/lib.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/colorbleed/maya/lib.py b/colorbleed/maya/lib.py index 20df970f74..67464360c5 100644 --- a/colorbleed/maya/lib.py +++ b/colorbleed/maya/lib.py @@ -371,26 +371,6 @@ def evaluation(mode="off"): cmds.evaluationManager(mode=original) -@contextlib.contextmanager -def no_refresh(): - """Temporarily disables Maya's UI updates - - Note: - This only disabled the main pane and will sometimes still - trigger updates in torn off panels. - - """ - - pane = _get_mel_global('gMainPane') - state = cmds.paneLayout(pane, query=True, manage=True) - cmds.paneLayout(pane, edit=True, manage=False) - - try: - yield - finally: - cmds.paneLayout(pane, edit=True, manage=state) - - @contextlib.contextmanager def empty_sets(sets, force=False): """Remove all members of the sets during the context"""