mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 22:02:15 +01:00
OP-4218 - fix version logic
Added documentation.
This commit is contained in:
parent
06909bc452
commit
4214aa1403
1 changed files with 8 additions and 3 deletions
|
|
@ -91,15 +91,19 @@ class CollectPublishedFiles(pyblish.api.ContextPlugin):
|
|||
host_name="webpublisher",
|
||||
project_settings=context.data["project_settings"]
|
||||
)
|
||||
next_versions.append(self._get_next_version(
|
||||
version = self._get_next_version(
|
||||
project_name, asset_doc, subset_name
|
||||
))
|
||||
)
|
||||
next_versions.append(version)
|
||||
|
||||
instance = context.create_instance(subset_name)
|
||||
instance.data["asset"] = asset_name
|
||||
instance.data["subset"] = subset_name
|
||||
# set configurable result family
|
||||
instance.data["family"] = family
|
||||
# set configurable additional families
|
||||
instance.data["families"] = families
|
||||
instance.data["version"] = version
|
||||
instance.data["stagingDir"] = tempfile.mkdtemp()
|
||||
instance.data["source"] = "webpublisher"
|
||||
|
||||
|
|
@ -146,6 +150,7 @@ class CollectPublishedFiles(pyblish.api.ContextPlugin):
|
|||
if not self.sync_version:
|
||||
return
|
||||
|
||||
# overwrite specific version with same version for all
|
||||
max_next_version = max(next_versions)
|
||||
for inst in instances:
|
||||
inst.data["version"] = max_next_version
|
||||
|
|
@ -187,7 +192,7 @@ class CollectPublishedFiles(pyblish.api.ContextPlugin):
|
|||
"ext": ext[1:],
|
||||
"files": files,
|
||||
"stagingDir": task_dir,
|
||||
"tags": tags
|
||||
"tags": tags # configurable tags from Settings
|
||||
}
|
||||
self.log.info("sequences repre_data.data:: {}".format(repre_data))
|
||||
return [repre_data]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue