mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #2782 from pypeclub/bugfix/OP-2726_Webpublisher-Ftrack-review-burnin-displaying-pypeclub
Webpublisher: Fix use ftrack username in burnins
This commit is contained in:
commit
6a39f65bb0
2 changed files with 13 additions and 3 deletions
|
|
@ -33,7 +33,6 @@ class CollectUsername(pyblish.api.ContextPlugin):
|
|||
|
||||
def process(self, context):
|
||||
self.log.info("CollectUsername")
|
||||
|
||||
os.environ["FTRACK_API_USER"] = os.environ["FTRACK_BOT_API_USER"]
|
||||
os.environ["FTRACK_API_KEY"] = os.environ["FTRACK_BOT_API_KEY"]
|
||||
|
||||
|
|
@ -57,7 +56,12 @@ class CollectUsername(pyblish.api.ContextPlugin):
|
|||
if not user:
|
||||
raise ValueError(
|
||||
"Couldn't find user with {} email".format(user_email))
|
||||
|
||||
username = user[0].get("username")
|
||||
user = user[0]
|
||||
username = user.get("username")
|
||||
self.log.debug("Resolved ftrack username:: {}".format(username))
|
||||
os.environ["FTRACK_API_USER"] = username
|
||||
|
||||
burnin_name = username
|
||||
if '@' in burnin_name:
|
||||
burnin_name = burnin_name[:burnin_name.index('@')]
|
||||
os.environ["WEBPUBLISH_OPENPYPE_USERNAME"] = burnin_name
|
||||
|
|
|
|||
|
|
@ -478,6 +478,12 @@ class ExtractBurnin(openpype.api.Extractor):
|
|||
"frame_end_handle": frame_end_handle
|
||||
}
|
||||
|
||||
# use explicit username for webpublishes as rewriting
|
||||
# OPENPYPE_USERNAME might have side effects
|
||||
webpublish_user_name = os.environ.get("WEBPUBLISH_OPENPYPE_USERNAME")
|
||||
if webpublish_user_name:
|
||||
burnin_data["username"] = webpublish_user_name
|
||||
|
||||
self.log.debug(
|
||||
"Basic burnin_data: {}".format(json.dumps(burnin_data, indent=4))
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue