mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 22:02:15 +01:00
added module command to openpype cli
This commit is contained in:
parent
41bb148cae
commit
55c25452cc
2 changed files with 18 additions and 1 deletions
|
|
@ -57,7 +57,13 @@ def tray(debug=False):
|
|||
PypeCommands().launch_tray(debug)
|
||||
|
||||
|
||||
@main.command()
|
||||
@PypeCommands.add_modules
|
||||
@main.group(help="Run command line arguments of OpenPype modules")
|
||||
@click.pass_context
|
||||
def module(ctx):
|
||||
pass
|
||||
|
||||
|
||||
@click.option("-d", "--debug", is_flag=True, help="Print debug messages")
|
||||
@click.option("--ftrack-url", envvar="FTRACK_SERVER",
|
||||
help="Ftrack server url")
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
import os
|
||||
import sys
|
||||
import json
|
||||
import click
|
||||
from datetime import datetime
|
||||
|
||||
from openpype.lib import PypeLogger
|
||||
|
|
@ -33,6 +34,16 @@ class PypeCommands:
|
|||
user_role = "manager"
|
||||
settings.main(user_role)
|
||||
|
||||
@staticmethod
|
||||
def add_modules(click_func):
|
||||
from openpype.modules import ModulesManager
|
||||
|
||||
manager = ModulesManager()
|
||||
for module in manager.modules:
|
||||
if hasattr(module, "cli"):
|
||||
module.cli(click_func)
|
||||
return click_func
|
||||
|
||||
@staticmethod
|
||||
def launch_eventservercli(*args):
|
||||
from openpype_modules.ftrack.ftrack_server.event_server_cli import (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue