mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merged in bugfix/3de-sync-fixes (pull request #368)
small bugfixes arising from syncing with 3de Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
commit
dc0bd2dd39
4 changed files with 28 additions and 18 deletions
|
|
@ -37,6 +37,8 @@ class IntegrateFtrackInstance(pyblish.api.InstancePlugin):
|
||||||
|
|
||||||
if instance.data.get('version'):
|
if instance.data.get('version'):
|
||||||
version_number = int(instance.data.get('version'))
|
version_number = int(instance.data.get('version'))
|
||||||
|
else:
|
||||||
|
raise ValueError("Instance version not set")
|
||||||
|
|
||||||
family = instance.data['family'].lower()
|
family = instance.data['family'].lower()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,23 @@
|
||||||
import os
|
import os
|
||||||
from os.path import getsize
|
from os.path import getsize
|
||||||
import logging
|
import logging
|
||||||
import speedcopy
|
import sys
|
||||||
import clique
|
import clique
|
||||||
import errno
|
import errno
|
||||||
import pyblish.api
|
import pyblish.api
|
||||||
from avalon import api, io
|
from avalon import api, io
|
||||||
from avalon.vendor import filelink
|
from avalon.vendor import filelink
|
||||||
|
# this is needed until speedcopy for linux is fixed
|
||||||
|
if sys.platform == "win32":
|
||||||
|
from speedcopy import copyfile
|
||||||
|
else:
|
||||||
|
from shutil import copyfile
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
||||||
"""Resolve any dependency issius
|
"""Resolve any dependency issues
|
||||||
|
|
||||||
This plug-in resolves any paths which, if not updated might break
|
This plug-in resolves any paths which, if not updated might break
|
||||||
the published file.
|
the published file.
|
||||||
|
|
@ -475,7 +480,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
||||||
|
|
||||||
# copy file with speedcopy and check if size of files are simetrical
|
# copy file with speedcopy and check if size of files are simetrical
|
||||||
while True:
|
while True:
|
||||||
speedcopy.copyfile(src, dst)
|
copyfile(src, dst)
|
||||||
if str(getsize(src)) in str(getsize(dst)):
|
if str(getsize(src)) in str(getsize(dst)):
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
@ -501,7 +506,8 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
||||||
subset_name = instance.data["subset"]
|
subset_name = instance.data["subset"]
|
||||||
self.log.info("Subset '%s' not found, creating.." % subset_name)
|
self.log.info("Subset '%s' not found, creating.." % subset_name)
|
||||||
self.log.debug("families. %s" % instance.data.get('families'))
|
self.log.debug("families. %s" % instance.data.get('families'))
|
||||||
self.log.debug("families. %s" % type(instance.data.get('families')))
|
self.log.debug(
|
||||||
|
"families. %s" % type(instance.data.get('families')))
|
||||||
|
|
||||||
_id = io.insert_one({
|
_id = io.insert_one({
|
||||||
"schema": "pype:subset-3.0",
|
"schema": "pype:subset-3.0",
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
import pyblish.api
|
import pyblish.api
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
class ValidateTemplates(pyblish.api.ContextPlugin):
|
class ValidateTemplates(pyblish.api.ContextPlugin):
|
||||||
"""Check if all templates were filed"""
|
"""Check if all templates were filled"""
|
||||||
|
|
||||||
label = "Validate Templates"
|
label = "Validate Templates"
|
||||||
order = pyblish.api.ValidatorOrder - 0.1
|
order = pyblish.api.ValidatorOrder - 0.1
|
||||||
|
|
@ -22,9 +23,9 @@ class ValidateTemplates(pyblish.api.ContextPlugin):
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"task": "animation",
|
"task": "animation",
|
||||||
"asset": "sh001",
|
"asset": "sh001",
|
||||||
|
"app": "maya",
|
||||||
"hierarchy": "ep101/sq01/sh010"}
|
"hierarchy": "ep101/sq01/sh010"}
|
||||||
|
|
||||||
|
|
||||||
anatomy_filled = anatomy.format(data)
|
anatomy_filled = anatomy.format(data)
|
||||||
self.log.info(anatomy_filled)
|
self.log.info(anatomy_filled)
|
||||||
|
|
||||||
|
|
@ -35,6 +36,7 @@ class ValidateTemplates(pyblish.api.ContextPlugin):
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"task": "lookdev",
|
"task": "lookdev",
|
||||||
"asset": "bob",
|
"asset": "bob",
|
||||||
|
"app": "maya",
|
||||||
"hierarchy": "ep101/sq01/bob"}
|
"hierarchy": "ep101/sq01/bob"}
|
||||||
|
|
||||||
anatomy_filled = context.data["anatomy"].format(data)
|
anatomy_filled = context.data["anatomy"].format(data)
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ class CreateRenderGlobals(avalon.maya.Creator):
|
||||||
self.log.warning("Deadline REST API url not found.")
|
self.log.warning("Deadline REST API url not found.")
|
||||||
else:
|
else:
|
||||||
argument = "{}/api/pools?NamesOnly=true".format(deadline_url)
|
argument = "{}/api/pools?NamesOnly=true".format(deadline_url)
|
||||||
response = requests.get(argument)
|
response = self._requests_get(argument)
|
||||||
if not response.ok:
|
if not response.ok:
|
||||||
self.log.warning("No pools retrieved")
|
self.log.warning("No pools retrieved")
|
||||||
else:
|
else:
|
||||||
|
|
@ -135,7 +135,7 @@ class CreateRenderGlobals(avalon.maya.Creator):
|
||||||
'authToken': self._token
|
'authToken': self._token
|
||||||
}
|
}
|
||||||
api_entry = '/api/pools/list'
|
api_entry = '/api/pools/list'
|
||||||
response = requests.get(
|
response = self._requests_get(
|
||||||
self.MUSTER_REST_URL + api_entry, params=params)
|
self.MUSTER_REST_URL + api_entry, params=params)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
if response.status_code == 401:
|
if response.status_code == 401:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue