mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
fix(nk, nks): version is better if None then "last"
This commit is contained in:
parent
5a8b4a7188
commit
c87dca6f9d
2 changed files with 7 additions and 4 deletions
|
|
@ -495,7 +495,7 @@ def filter_pyblish_plugins(plugins):
|
|||
|
||||
def get_subsets(asset_name,
|
||||
regex_filter=None,
|
||||
version="last",
|
||||
version=None,
|
||||
representations=["exr", "dpx"]):
|
||||
"""
|
||||
Query subsets with filter on name.
|
||||
|
|
@ -538,11 +538,12 @@ def get_subsets(asset_name,
|
|||
output_dict = {}
|
||||
# Process subsets
|
||||
for subset in subsets:
|
||||
if "last" in str(version):
|
||||
if not version:
|
||||
version_sel = io.find_one({"type": "version",
|
||||
"parent": subset["_id"]},
|
||||
sort=[("name", -1)])
|
||||
else:
|
||||
assert isinstance(version, int), "version needs to be `int` type"
|
||||
version_sel = io.find_one({"type": "version",
|
||||
"parent": subset["_id"],
|
||||
"name": int(version)})
|
||||
|
|
|
|||
|
|
@ -889,7 +889,7 @@ class BuildWorkfile(WorkfileSettings):
|
|||
|
||||
def process(self,
|
||||
regex_filter=None,
|
||||
version="last",
|
||||
version=None,
|
||||
representations=["exr", "dpx"]):
|
||||
"""
|
||||
A short description.
|
||||
|
|
@ -897,7 +897,9 @@ class BuildWorkfile(WorkfileSettings):
|
|||
A bit longer description.
|
||||
|
||||
Args:
|
||||
variable (type): description
|
||||
regex_filter (raw string): regex pattern to filter out subsets
|
||||
version (int): define a particular version, None gets last
|
||||
representations (list):
|
||||
|
||||
Returns:
|
||||
type: description
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue