mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 22:02:15 +01:00
check if input values of seeder are greater than 0
This commit is contained in:
parent
0024688a44
commit
080f1f6819
1 changed files with 16 additions and 0 deletions
|
|
@ -270,6 +270,10 @@ class SeedDebugProject(BaseAction):
|
|||
except ValueError:
|
||||
asset_count = 0
|
||||
|
||||
if asset_count <= 0:
|
||||
self.log.debug("No assets to create")
|
||||
return
|
||||
|
||||
main_entity = self.session.create("Folder", {
|
||||
"name": "Assets",
|
||||
"parent": project
|
||||
|
|
@ -322,6 +326,18 @@ class SeedDebugProject(BaseAction):
|
|||
except ValueError:
|
||||
shots_count = 0
|
||||
|
||||
# Check if both are higher than 0
|
||||
missing = []
|
||||
if seq_count <= 0:
|
||||
missing.append("sequences")
|
||||
|
||||
if shots_count <= 0:
|
||||
missing.append("shots")
|
||||
|
||||
if missing:
|
||||
self.log.debug("No {} to create".format(" and ".join(missing)))
|
||||
return
|
||||
|
||||
# Create Folder "Shots"
|
||||
main_entity = self.session.create("Folder", {
|
||||
"name": "Shots",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue