Merge pull request #201 from aardschok/PLN-170

Collect machine name
This commit is contained in:
Wijnand Koreman 2018-10-26 14:10:12 +02:00 committed by GitHub
commit 011702d77d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -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})

View file

@ -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"]