Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
added ability to hide publish if plugin need it
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Jan 12, 2022
1 parent f871bae commit 6c2204c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions openpype/tools/pyblish_pype/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,13 @@ def on_about_to_process(self, plugin, instance):
self.tr("Processing"), plugin_item.data(QtCore.Qt.DisplayRole)
))

visibility = True
if hasattr(plugin, "hide_ui_on_process") and plugin.hide_ui_on_process:
visibility = False

if self.isVisible() != visibility:
self.setVisible(visibility)

def on_plugin_action_menu_requested(self, pos):
"""The user right-clicked on a plug-in
__________
Expand Down

2 comments on commit 6c2204c

@BigRoy
Copy link
Collaborator

@BigRoy BigRoy commented on 6c2204c Feb 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering - what's the specific use case where just a single plug-in would want to hide the pyblish UI? I'm seeing it used in a flame plug-in currently. I'm wondering why it's used there? I can't find any source issue/PR where it's discussed so I figured I could comment here.

@iLLiCiTiT
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakubjezek001 can you describe the use case in flame?

Please sign in to comment.