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

Commit

Permalink
removed redundant code from aftereffects and photoshop
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Apr 25, 2022
1 parent b30db92 commit 2584881
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 31 deletions.
20 changes: 4 additions & 16 deletions openpype/hosts/aftereffects/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,11 @@ def check_inventory():
if not lib.any_outdated():
return

host = pyblish.api.registered_host()
outdated_containers = []
for container in host.ls():
representation = container['representation']
representation_doc = legacy_io.find_one(
{
"_id": legacy_io.ObjectId(representation),
"type": "representation"
},
projection={"parent": True}
)
if representation_doc and not lib.is_latest(representation_doc):
outdated_containers.append(container)

# Warn about outdated containers.
print("Starting new QApplication..")
_app = QtWidgets.QApplication(sys.argv)
_app = QtWidgets.QApplication.instance()
if not _app:
print("Starting new QApplication..")
_app = QtWidgets.QApplication([])

message_box = QtWidgets.QMessageBox()
message_box.setIcon(QtWidgets.QMessageBox.Warning)
Expand Down
19 changes: 4 additions & 15 deletions openpype/hosts/photoshop/api/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,11 @@ def check_inventory():
if not lib.any_outdated():
return

host = registered_host()
outdated_containers = []
for container in host.ls():
representation = container['representation']
representation_doc = legacy_io.find_one(
{
"_id": ObjectId(representation),
"type": "representation"
},
projection={"parent": True}
)
if representation_doc and not lib.is_latest(representation_doc):
outdated_containers.append(container)

# Warn about outdated containers.
print("Starting new QApplication..")
_app = QtWidgets.QApplication.instance()
if not _app:
print("Starting new QApplication..")
_app = QtWidgets.QApplication([])

message_box = QtWidgets.QMessageBox()
message_box.setIcon(QtWidgets.QMessageBox.Warning)
Expand Down

0 comments on commit 2584881

Please sign in to comment.