added new cli argument 'contextselection'

This commit is contained in:
iLLiCiTiT 2021-10-29 18:31:25 +02:00
parent 640b68b89c
commit b23d017936
2 changed files with 34 additions and 0 deletions

View file

@ -282,6 +282,34 @@ def projectmanager():
PypeCommands().launch_project_manager()
@main.command()
@click.argument("output_path")
@click.option("--project", help="Define project context")
@click.option("--asset", help="Define asset in project (project must be set)")
@click.option(
"--strict",
is_flag=True,
help="Full context must be set otherwise dialog can't be closed."
)
def contextselection(
output_path,
project,
asset,
strict
):
"""Show Qt dialog to select context.
Context is project name, asset name and task name. The result is stored
into json file which path is passed in first argument.
"""
PypeCommands.contextselection(
output_path,
project,
asset,
strict
)
@main.command(
context_settings=dict(
ignore_unknown_options=True,

View file

@ -293,6 +293,12 @@ class PypeCommands:
project_manager.main()
@staticmethod
def contextselection(output_path, project_name, asset_name, strict):
from openpype.tools.context_dialog import main
main(output_path, project_name, asset_name, strict)
def texture_copy(self, project, asset, path):
pass