mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Removed details
This commit is contained in:
parent
90c1044bcf
commit
2c21c28417
1 changed files with 5 additions and 8 deletions
|
|
@ -8,13 +8,9 @@ from avalon import io, lib
|
|||
|
||||
def register(session):
|
||||
|
||||
try: os.environ['AVALON_PROJECT']
|
||||
except: os.environ['AVALON_PROJECT'] = 'tmp'
|
||||
try: os.environ['AVALON_ASSET']
|
||||
except: os.environ['AVALON_ASSET'] = 'tmp'
|
||||
try: os.environ['AVALON_SILO']
|
||||
except: os.environ['AVALON_SILO'] = 'tmp'
|
||||
# TODO AVALON_PROJECT, AVALON_ASSET, AVALON_SILO need to be set or debug from avalon
|
||||
|
||||
# Get all projects from Avalon DB
|
||||
io.install()
|
||||
projects = sorted(io.projects(), key=lambda x: x['name'])
|
||||
io.uninstall()
|
||||
|
|
@ -22,20 +18,20 @@ def register(session):
|
|||
apps=[]
|
||||
actions = []
|
||||
|
||||
# Get all application from all projects
|
||||
for project in projects:
|
||||
os.environ['AVALON_PROJECT'] = project['name']
|
||||
for app in project['config']['apps']:
|
||||
if app not in apps:
|
||||
apps.append(app)
|
||||
|
||||
# TODO get right icons
|
||||
for app in apps:
|
||||
name = app['name'].split("_")[0]
|
||||
variant = app['name'].split("_")[1]
|
||||
label = app['label']
|
||||
executable = toml.load(lib.which_app(app['name']))['executable']
|
||||
icon = None
|
||||
|
||||
# TODO get right icons
|
||||
if 'nuke' in app['name']:
|
||||
icon = "https://mbtskoudsalg.com/images/nuke-icon-png-2.png"
|
||||
label = "Nuke"
|
||||
|
|
@ -43,4 +39,5 @@ def register(session):
|
|||
icon = "http://icons.iconarchive.com/icons/froyoshark/enkel/256/Maya-icon.png"
|
||||
label = "Autodesk Maya"
|
||||
|
||||
# register action
|
||||
AppAction(session, label, name, executable, variant, icon).register()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue