mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
fixed few anatomy bugs
This commit is contained in:
parent
4822fc88bc
commit
57b33ac987
3 changed files with 4 additions and 17 deletions
|
|
@ -1711,14 +1711,10 @@ class SyncEntitiesFactory:
|
|||
except InvalidId:
|
||||
new_id = ObjectId()
|
||||
|
||||
project_name = self.entities_dict[self.ft_project_id]["name"]
|
||||
project_item["_id"] = new_id
|
||||
project_item["parent"] = None
|
||||
project_item["schema"] = EntitySchemas["project"]
|
||||
project_item["config"]["schema"] = EntitySchemas["config"]
|
||||
project_item["config"]["template"] = (
|
||||
get_avalon_project_template(project_name)
|
||||
)
|
||||
|
||||
self.ftrack_avalon_mapper[self.ft_project_id] = new_id
|
||||
self.avalon_ftrack_mapper[new_id] = self.ft_project_id
|
||||
|
|
|
|||
|
|
@ -645,11 +645,8 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
else:
|
||||
source = context.data["currentFile"]
|
||||
anatomy = instance.context.data["anatomy"]
|
||||
root_name = anatomy.templates["work"].get("root_name")
|
||||
success, rootless_path = (
|
||||
anatomy.roots.find_root_template_from_path(
|
||||
source, root_name, others_on_fail=True
|
||||
)
|
||||
anatomy.roots_obj.find_root_template_from_path(source)
|
||||
)
|
||||
if success:
|
||||
source = rootless_path
|
||||
|
|
|
|||
|
|
@ -185,9 +185,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
anatomy = instance.context.data["anatomy"]
|
||||
work_root_name = anatomy.templates["work"].get("root_name")
|
||||
success, rootless_path = (
|
||||
anatomy.roots.find_root_template_from_path(
|
||||
output_dir, work_root_name
|
||||
)
|
||||
anatomy.roots_obj.find_root_template_from_path(output_dir)
|
||||
)
|
||||
if not success:
|
||||
# `rootless_path` is not set to `output_dir` if none of roots match
|
||||
|
|
@ -568,9 +566,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
anatomy = instance.context.data["anatomy"]
|
||||
work_root_name = anatomy.templates["work"].get("root_name")
|
||||
success, rootless_path = (
|
||||
anatomy.roots.find_root_template_from_path(
|
||||
source, work_root_name
|
||||
)
|
||||
anatomy.roots_obj.find_root_template_from_path(source)
|
||||
)
|
||||
if success:
|
||||
source = rootless_path
|
||||
|
|
@ -622,9 +618,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
staging_dir = repre.get("stagingDir")
|
||||
if staging_dir:
|
||||
success, rootless_staging_dir = (
|
||||
anatomy.roots.find_root_template_from_path(
|
||||
repre, work_root_name
|
||||
)
|
||||
anatomy.roots.find_root_template_from_path(staging_dir)
|
||||
)
|
||||
if success:
|
||||
repre["stagingDir"] = rootless_staging_dir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue