mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #607 from pypeclub/feature/publish_user_on_deadline
Deadline user defaults to pype username if present
This commit is contained in:
commit
b999775ba0
3 changed files with 7 additions and 5 deletions
|
|
@ -13,7 +13,7 @@ class CollectCurrentUserPype(pyblish.api.ContextPlugin):
|
|||
def process(self, context):
|
||||
user = os.getenv("PYPE_USERNAME", "").strip()
|
||||
if not user:
|
||||
return
|
||||
user = context.data.get("user", getpass.getuser())
|
||||
|
||||
context.data["user"] = user
|
||||
self.log.debug("Pype user is \"{}\"".format(user))
|
||||
self.log.debug("Colected user \"{}\"".format(user))
|
||||
|
|
|
|||
|
|
@ -174,7 +174,8 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
"FTRACK_SERVER",
|
||||
"PYPE_METADATA_FILE",
|
||||
"AVALON_PROJECT",
|
||||
"PYPE_LOG_NO_COLORS"
|
||||
"PYPE_LOG_NO_COLORS",
|
||||
"PYPE_USERNAME"
|
||||
]
|
||||
|
||||
# custom deadline atributes
|
||||
|
|
@ -297,6 +298,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
environment["PYPE_METADATA_FILE"] = roothless_metadata_path
|
||||
environment["AVALON_PROJECT"] = io.Session["AVALON_PROJECT"]
|
||||
environment["PYPE_LOG_NO_COLORS"] = "1"
|
||||
environment["PYPE_USERNAME"] = instance.context.data["user"]
|
||||
try:
|
||||
environment["PYPE_PYTHON_EXE"] = os.environ["PYPE_PYTHON_EXE"]
|
||||
except KeyError:
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
comment = context.data.get("comment", "")
|
||||
dirname = os.path.join(workspace, "renders")
|
||||
renderlayer = instance.data['setMembers'] # rs_beauty
|
||||
deadline_user = context.data.get("deadlineUser", getpass.getuser())
|
||||
deadline_user = context.data.get("user", getpass.getuser())
|
||||
jobname = "%s - %s" % (filename, instance.name)
|
||||
|
||||
# Get the variables depending on the renderer
|
||||
|
|
@ -418,7 +418,7 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
# Adding file dependencies.
|
||||
dependencies = instance.context.data["fileDependencies"]
|
||||
dependencies.append(filepath)
|
||||
if self.assembly_files:
|
||||
if self.asset_dependencies:
|
||||
for dependency in dependencies:
|
||||
key = "AssetDependency" + str(dependencies.index(dependency))
|
||||
payload_skeleton["JobInfo"][key] = dependency
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue