Add Custom Panel to SG Desktop

I followed this document to add the tk-multi-shotgunpanel as a tab in Shotgun Desktop, however nothing happens when I relaunch Shotgrid Desktop.

https://help.autodesk.com/view/SGDEV/ENU/?guid=SGD_pc_engine_desktop_html#site-configuration-and-project-configuration

I added the following in my site.yml in my custom pipeline configuration.

includes:
- ./includes/frameworks.yml
- ./includes/settings/tk-desktop.yml
- ./includes/settings/tk-desktop2.yml
- ./includes/app_locations.yml
- ./includes/engine_locations.yml

tk-desktop:
  apps:
    tk-multi-shotgunpanel:
      location: "@apps.tk-multi-shotgunpanel.location"
  location: "@engines.tk-desktop.location"
  run_at_startup:
  - {app_instance: '', name: Apps}
  - {app_instance: tk-multi-shotgunpanel, name: ''}

There are no errors, but the panel is not added as a tab. The logs don’t show anything out of the ordinary either. I verified that the site.yml is being read by purposely writing in wrong syntax to trigger an error.

Tried also adding the “run_at_startup” in the tk-desktop.yml. The panel gets added as an app in the “Studio” section but does not run or get added as a tab on Desktop startup.

# project
settings.tk-desktop.project:
  apps:
    tk-multi-shotgunpanel:
      location: "@apps.tk-multi-shotgunpanel.location"
    tk-multi-pythonconsole:
      location: "@apps.tk-multi-pythonconsole.location"
    tk-multi-devutils:
      location: "@apps.tk-multi-devutils.location"
    tk-multi-launchapp: "@settings.tk-multi-launchapp"
    tk-multi-launchhiero: "@settings.tk-multi-launchapp.hiero"
    tk-multi-launchmari: "@settings.tk-multi-launchapp.mari"
    tk-multi-launchmotionbuilder: "@settings.tk-multi-launchapp.motionbuilder"
    tk-multi-publish2: "@settings.tk-multi-publish2.standalone"
    tk-multi-screeningroom: "@settings.tk-multi-screeningroom.rv"
    tk-desktop-timecard: "@settings.tk-desktop-timecard.project"
    tk-multi-submitter: "@settings.tk-multi-shotsubmitter.houdini" # Set to houdini until we need to open up for other DCCS
    tk-multi-launchhoudini: "@settings.tk-multi-launchapp.houdini"
  run_at_startup:
  - {app_instance: '', name: Apps}
  - {app_instance: tk-multi-shotgunpanel, name: ''}

App v1.8.0
Python 3.9.13
Startup v2.3.2
Engine v2.6.2
Core v0.20.30

I dont think the tk-desktop engine has a run_at_startup function nor does it have a docking functionality.

Its meant as a launcher.

@Ricardo_Musch Thanks for the response. According to Add panel to SG Desktop a panel can be added to Desktop.

There’s also a run_at_startup setting in tk-desktop engine configuration
tk-desktop/info.yml at master · shotgunsoftware/tk-desktop · GitHub.

I also see code for adding a panel here: tk-desktop/python/tk_desktop/desktop_engine_site_implementation.py at master · shotgunsoftware/tk-desktop · GitHub

Just not sure why following those steps are not working for me. Seems like it should be pretty straighforward. But I can’t get an app to launch automatically or get added as a panel. So far I’ve tried, tk-multi-publish2, tk-multi-pythonconsole, and tk-multi-shotgundpanel.

It looks to me that my site.yml is only being read when I select a project and not at the project selection stage of launching Desktop. Not sure if that has anything to do with it.

Might have to take over tk-desktop and start debugging.

In that case, go into the down arrow and open the log folder.
Then look at the logs from the tk-desktop.log file to see if there are any error messages regarding the panel app.

Thanks @Ricardo_Musch . I went through the logs and there are no errors relating to the panel. There is a warning:

WARNING sgtk.ext.tkimpdd296c84ecb544398738605235fae0d3.tk_desktop.site_communication] [PROXY] Panel functionality not implemented. Falling back to showing panel ‘tk_multi_shotgunpanel_main’ in a modeless dialog

This is only triggered when I launch the panel from the “Studio” section entry after selecting a project in SG Desktop, though.

I think the run_at_startup setting in this case actually handles the loading of the apps drawer and nothing else:

Hmm, from my understanding the _run_startup_commands function reads from the “run_at_startup” setting and executes any commands in the list. Apps is a special reserved case that the engine handles itself.