mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
implement createprojectstructure cli action.
This commit is contained in:
parent
1cf0cc5736
commit
d5b2642e8d
1 changed files with 23 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ from ayon_core.lib.env_tools import (
|
|||
compute_env_variables_structure,
|
||||
merge_env_variables,
|
||||
)
|
||||
|
||||
from ayon_core.pipeline import project_folders
|
||||
|
||||
|
||||
@click.group(invoke_without_command=True)
|
||||
|
|
@ -258,6 +258,28 @@ def _set_global_environments() -> None:
|
|||
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
|
||||
|
||||
|
||||
@main_cli.command()
|
||||
@click.option(
|
||||
"--project",
|
||||
type=str,
|
||||
help="Define project (project must be set).",
|
||||
required=True)
|
||||
def createprojectstructure(
|
||||
project,
|
||||
):
|
||||
"""Create project folder structure as defined in setting
|
||||
`ayon+settings://core/project_folder_structure`
|
||||
|
||||
Args:
|
||||
project (str): The name of the project for which you
|
||||
want to create its additional folder structure.
|
||||
|
||||
"""
|
||||
|
||||
print(f">>> Creating project folder structure for project '{project}'.")
|
||||
project_folders.create_project_folders(project)
|
||||
|
||||
|
||||
def _set_addons_environments(addons_manager):
|
||||
"""Set global environments for AYON addons."""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue