mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
PYPE-1901 - switch to context plugin to limit double closing
This commit is contained in:
parent
7d3c1863c2
commit
d085e4ff7d
1 changed files with 3 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ import pyblish.api
|
|||
|
||||
from avalon import photoshop
|
||||
|
||||
class ClosePS(pyblish.api.InstancePlugin):
|
||||
class ClosePS(pyblish.api.ContextPlugin):
|
||||
"""Close PS after publish. For Webpublishing only.
|
||||
"""
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ class ClosePS(pyblish.api.InstancePlugin):
|
|||
|
||||
hosts = ["photoshop"]
|
||||
|
||||
def process(self, instance):
|
||||
def process(self, context):
|
||||
self.log.info("ClosePS")
|
||||
if not os.environ.get("IS_HEADLESS"):
|
||||
return
|
||||
|
|
@ -26,3 +26,4 @@ class ClosePS(pyblish.api.InstancePlugin):
|
|||
self.log.info("Shutting down PS")
|
||||
stub.save()
|
||||
stub.close()
|
||||
self.log.info("PS closed")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue