diff --git a/colorbleed/plugins/global/publish/collect_machine_name.py b/colorbleed/plugins/global/publish/collect_machine_name.py new file mode 100644 index 0000000000..e1c4a88669 --- /dev/null +++ b/colorbleed/plugins/global/publish/collect_machine_name.py @@ -0,0 +1,14 @@ +import pyblish.api + + +class CollectMachineName(pyblish.api.ContextPlugin): + label = "Local Machine Name" + order = pyblish.api.CollectorOrder + hosts = ["*"] + + def process(self, context): + import socket + + machine_name = socket.gethostname() + self.log.info("Machine name: %s" % machine_name) + context.data.update({"machine": machine_name}) diff --git a/colorbleed/plugins/global/publish/integrate.py b/colorbleed/plugins/global/publish/integrate.py index 2dae53335d..5d757b3b1c 100644 --- a/colorbleed/plugins/global/publish/integrate.py +++ b/colorbleed/plugins/global/publish/integrate.py @@ -340,7 +340,8 @@ class IntegrateAsset(pyblish.api.InstancePlugin): "time": context.data["time"], "author": context.data["user"], "source": source, - "comment": context.data.get("comment")} + "comment": context.data.get("comment"), + "machine": context.data.get("machine")} # Include optional data if present in optionals = ["startFrame", "endFrame", "step", "handles"]