Skip to content

Commit a790b36

Browse files
committed
Removed the Publish app from the non-contextual Unreal Shotgun menu.
1 parent 1a75016 commit a790b36

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

python/tk_unreal/unreal_sg_engine.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,13 @@ def _add_app_menu(self, commands_by_app, menu_items):
313313
:param commands_by_app: Dictionary of app name and commands related to the app, which
314314
will be added to the menu_items
315315
"""
316+
has_selection = len(self.selected_assets) > 0 or len(self.selected_actors) > 0
317+
316318
for app_name in sorted(commands_by_app.keys()):
319+
# Exclude the Publish app if it doesn't have any context
320+
if app_name == "Publish" and not has_selection:
321+
continue
322+
317323
if len(commands_by_app[app_name]) > 1:
318324
# more than one menu entry fort his app
319325
# make a menu section and put all items in that menu section

0 commit comments

Comments
 (0)