From fecf960bc84875c0966a3b0099fe22274dcfa612 Mon Sep 17 00:00:00 2001 From: wikoreman Date: Fri, 26 Oct 2018 14:57:55 +0200 Subject: [PATCH] Added workscene fps collector for Maya --- .../plugins/maya/publish/collect_workscene_fps.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 colorbleed/plugins/maya/publish/collect_workscene_fps.py diff --git a/colorbleed/plugins/maya/publish/collect_workscene_fps.py b/colorbleed/plugins/maya/publish/collect_workscene_fps.py new file mode 100644 index 0000000000..41d6ffea33 --- /dev/null +++ b/colorbleed/plugins/maya/publish/collect_workscene_fps.py @@ -0,0 +1,15 @@ +import pyblish.api +from maya import mel + + +class CollectWorksceneFPS(pyblish.api.ContextPlugin): + """Get the FPS of the work scene""" + + label = "Workscene FPS" + order = pyblish.api.CollectorOrder + hosts = ["maya"] + + def process(self, context): + fps = mel.eval('currentTimeUnitToFPS()') + self.log.info("Workscene FPS: %s" % fps) + context.data.update({"fps": fps})